<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - coverage_clean.info - 13/bits/basic_string.h</title>
  <link rel="stylesheet" type="text/css" href="../../gcov.css">
</head>

<body>

          <table width="100%" border=0 cellspacing=0 cellpadding=0>
            <tr><td class="title">LCOV - code coverage report</td></tr>
            <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>

            <tr>
              <td width="100%">
                <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="10%" class="headerValue"><a href="../../index.html">top level</a> - <a href="index.html">13/bits</a> - basic_string.h<span style="font-size: 80%;"> (source / <a href="basic_string.h.func-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="5%"></td>
            <td width="5%" class="headerCovTableHead">Coverage</td>
            <td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
            <td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">coverage_clean.info</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntryMed">78.4&nbsp;%</td>
            <td class="headerCovTableEntry">37</td>
            <td class="headerCovTableEntry">29</td>
          </tr>
          <tr>
            <td class="headerItem">Test Date:</td>
            <td class="headerValue">2025-11-25 04:45:29</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntryLo">72.7&nbsp;%</td>
            <td class="headerCovTableEntry">11</td>
            <td class="headerCovTableEntry">8</td>
          </tr>
                  <tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
                </table>
              </td>
            </tr>

            <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
          </table>

          <table cellpadding=0 cellspacing=0 border=0>
            <tr>
              <td><br></td>
            </tr>
            <tr>
              <td>
<pre class="sourceHeading">            Line data    Source code</pre>
<pre class="source">
<span id="L1"><span class="lineNum">       1</span>              : // Components for manipulating sequences of characters -*- C++ -*-</span>
<span id="L2"><span class="lineNum">       2</span>              : </span>
<span id="L3"><span class="lineNum">       3</span>              : // Copyright (C) 1997-2023 Free Software Foundation, Inc.</span>
<span id="L4"><span class="lineNum">       4</span>              : //</span>
<span id="L5"><span class="lineNum">       5</span>              : // This file is part of the GNU ISO C++ Library.  This library is free</span>
<span id="L6"><span class="lineNum">       6</span>              : // software; you can redistribute it and/or modify it under the</span>
<span id="L7"><span class="lineNum">       7</span>              : // terms of the GNU General Public License as published by the</span>
<span id="L8"><span class="lineNum">       8</span>              : // Free Software Foundation; either version 3, or (at your option)</span>
<span id="L9"><span class="lineNum">       9</span>              : // any later version.</span>
<span id="L10"><span class="lineNum">      10</span>              : </span>
<span id="L11"><span class="lineNum">      11</span>              : // This library is distributed in the hope that it will be useful,</span>
<span id="L12"><span class="lineNum">      12</span>              : // but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<span id="L13"><span class="lineNum">      13</span>              : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<span id="L14"><span class="lineNum">      14</span>              : // GNU General Public License for more details.</span>
<span id="L15"><span class="lineNum">      15</span>              : </span>
<span id="L16"><span class="lineNum">      16</span>              : // Under Section 7 of GPL version 3, you are granted additional</span>
<span id="L17"><span class="lineNum">      17</span>              : // permissions described in the GCC Runtime Library Exception, version</span>
<span id="L18"><span class="lineNum">      18</span>              : // 3.1, as published by the Free Software Foundation.</span>
<span id="L19"><span class="lineNum">      19</span>              : </span>
<span id="L20"><span class="lineNum">      20</span>              : // You should have received a copy of the GNU General Public License and</span>
<span id="L21"><span class="lineNum">      21</span>              : // a copy of the GCC Runtime Library Exception along with this program;</span>
<span id="L22"><span class="lineNum">      22</span>              : // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see</span>
<span id="L23"><span class="lineNum">      23</span>              : // &lt;http://www.gnu.org/licenses/&gt;.</span>
<span id="L24"><span class="lineNum">      24</span>              : </span>
<span id="L25"><span class="lineNum">      25</span>              : /** @file bits/basic_string.h</span>
<span id="L26"><span class="lineNum">      26</span>              :  *  This is an internal header file, included by other library headers.</span>
<span id="L27"><span class="lineNum">      27</span>              :  *  Do not attempt to use it directly. @headername{string}</span>
<span id="L28"><span class="lineNum">      28</span>              :  */</span>
<span id="L29"><span class="lineNum">      29</span>              : </span>
<span id="L30"><span class="lineNum">      30</span>              : //</span>
<span id="L31"><span class="lineNum">      31</span>              : // ISO C++ 14882: 21 Strings library</span>
<span id="L32"><span class="lineNum">      32</span>              : //</span>
<span id="L33"><span class="lineNum">      33</span>              : </span>
<span id="L34"><span class="lineNum">      34</span>              : #ifndef _BASIC_STRING_H</span>
<span id="L35"><span class="lineNum">      35</span>              : #define _BASIC_STRING_H 1</span>
<span id="L36"><span class="lineNum">      36</span>              : </span>
<span id="L37"><span class="lineNum">      37</span>              : #pragma GCC system_header</span>
<span id="L38"><span class="lineNum">      38</span>              : </span>
<span id="L39"><span class="lineNum">      39</span>              : #include &lt;ext/alloc_traits.h&gt;</span>
<span id="L40"><span class="lineNum">      40</span>              : #include &lt;debug/debug.h&gt;</span>
<span id="L41"><span class="lineNum">      41</span>              : </span>
<span id="L42"><span class="lineNum">      42</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L43"><span class="lineNum">      43</span>              : #include &lt;initializer_list&gt;</span>
<span id="L44"><span class="lineNum">      44</span>              : #endif</span>
<span id="L45"><span class="lineNum">      45</span>              : </span>
<span id="L46"><span class="lineNum">      46</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L47"><span class="lineNum">      47</span>              : # include &lt;string_view&gt;</span>
<span id="L48"><span class="lineNum">      48</span>              : #endif</span>
<span id="L49"><span class="lineNum">      49</span>              : </span>
<span id="L50"><span class="lineNum">      50</span>              : #if ! _GLIBCXX_USE_CXX11_ABI</span>
<span id="L51"><span class="lineNum">      51</span>              : # include &quot;cow_string.h&quot;</span>
<span id="L52"><span class="lineNum">      52</span>              : #else</span>
<span id="L53"><span class="lineNum">      53</span>              : namespace std _GLIBCXX_VISIBILITY(default)</span>
<span id="L54"><span class="lineNum">      54</span>              : {</span>
<span id="L55"><span class="lineNum">      55</span>              : _GLIBCXX_BEGIN_NAMESPACE_VERSION</span>
<span id="L56"><span class="lineNum">      56</span>              : _GLIBCXX_BEGIN_NAMESPACE_CXX11</span>
<span id="L57"><span class="lineNum">      57</span>              : </span>
<span id="L58"><span class="lineNum">      58</span>              : #ifdef __cpp_lib_is_constant_evaluated</span>
<span id="L59"><span class="lineNum">      59</span>              : // Support P0980R1 in C++20.</span>
<span id="L60"><span class="lineNum">      60</span>              : # define __cpp_lib_constexpr_string 201907L</span>
<span id="L61"><span class="lineNum">      61</span>              : #elif __cplusplus &gt;= 201703L &amp;&amp; _GLIBCXX_HAVE_IS_CONSTANT_EVALUATED</span>
<span id="L62"><span class="lineNum">      62</span>              : // Support P0426R1 changes to char_traits in C++17.</span>
<span id="L63"><span class="lineNum">      63</span>              : # define __cpp_lib_constexpr_string 201611L</span>
<span id="L64"><span class="lineNum">      64</span>              : #endif</span>
<span id="L65"><span class="lineNum">      65</span>              : </span>
<span id="L66"><span class="lineNum">      66</span>              :   /**</span>
<span id="L67"><span class="lineNum">      67</span>              :    *  @class basic_string basic_string.h &lt;string&gt;</span>
<span id="L68"><span class="lineNum">      68</span>              :    *  @brief  Managing sequences of characters and character-like objects.</span>
<span id="L69"><span class="lineNum">      69</span>              :    *</span>
<span id="L70"><span class="lineNum">      70</span>              :    *  @ingroup strings</span>
<span id="L71"><span class="lineNum">      71</span>              :    *  @ingroup sequences</span>
<span id="L72"><span class="lineNum">      72</span>              :    *  @headerfile string</span>
<span id="L73"><span class="lineNum">      73</span>              :    *  @since C++98</span>
<span id="L74"><span class="lineNum">      74</span>              :    *</span>
<span id="L75"><span class="lineNum">      75</span>              :    *  @tparam _CharT  Type of character</span>
<span id="L76"><span class="lineNum">      76</span>              :    *  @tparam _Traits  Traits for character type, defaults to</span>
<span id="L77"><span class="lineNum">      77</span>              :    *                   char_traits&lt;_CharT&gt;.</span>
<span id="L78"><span class="lineNum">      78</span>              :    *  @tparam _Alloc  Allocator type, defaults to allocator&lt;_CharT&gt;.</span>
<span id="L79"><span class="lineNum">      79</span>              :    *</span>
<span id="L80"><span class="lineNum">      80</span>              :    *  Meets the requirements of a &lt;a href=&quot;tables.html#65&quot;&gt;container&lt;/a&gt;, a</span>
<span id="L81"><span class="lineNum">      81</span>              :    *  &lt;a href=&quot;tables.html#66&quot;&gt;reversible container&lt;/a&gt;, and a</span>
<span id="L82"><span class="lineNum">      82</span>              :    *  &lt;a href=&quot;tables.html#67&quot;&gt;sequence&lt;/a&gt;.  Of the</span>
<span id="L83"><span class="lineNum">      83</span>              :    *  &lt;a href=&quot;tables.html#68&quot;&gt;optional sequence requirements&lt;/a&gt;, only</span>
<span id="L84"><span class="lineNum">      84</span>              :    *  @c push_back, @c at, and @c %array access are supported.</span>
<span id="L85"><span class="lineNum">      85</span>              :    */</span>
<span id="L86"><span class="lineNum">      86</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L87"><span class="lineNum">      87</span>              :     class basic_string</span>
<span id="L88"><span class="lineNum">      88</span>              :     {</span>
<span id="L89"><span class="lineNum">      89</span>              :       typedef typename __gnu_cxx::__alloc_traits&lt;_Alloc&gt;::template</span>
<span id="L90"><span class="lineNum">      90</span>              :         rebind&lt;_CharT&gt;::other _Char_alloc_type;</span>
<span id="L91"><span class="lineNum">      91</span>              : </span>
<span id="L92"><span class="lineNum">      92</span>              :       typedef __gnu_cxx::__alloc_traits&lt;_Char_alloc_type&gt; _Alloc_traits;</span>
<span id="L93"><span class="lineNum">      93</span>              : </span>
<span id="L94"><span class="lineNum">      94</span>              :       // Types:</span>
<span id="L95"><span class="lineNum">      95</span>              :     public:</span>
<span id="L96"><span class="lineNum">      96</span>              :       typedef _Traits                                   traits_type;</span>
<span id="L97"><span class="lineNum">      97</span>              :       typedef typename _Traits::char_type               value_type;</span>
<span id="L98"><span class="lineNum">      98</span>              :       typedef _Char_alloc_type                          allocator_type;</span>
<span id="L99"><span class="lineNum">      99</span>              :       typedef typename _Alloc_traits::size_type         size_type;</span>
<span id="L100"><span class="lineNum">     100</span>              :       typedef typename _Alloc_traits::difference_type   difference_type;</span>
<span id="L101"><span class="lineNum">     101</span>              :       typedef typename _Alloc_traits::reference         reference;</span>
<span id="L102"><span class="lineNum">     102</span>              :       typedef typename _Alloc_traits::const_reference   const_reference;</span>
<span id="L103"><span class="lineNum">     103</span>              :       typedef typename _Alloc_traits::pointer           pointer;</span>
<span id="L104"><span class="lineNum">     104</span>              :       typedef typename _Alloc_traits::const_pointer     const_pointer;</span>
<span id="L105"><span class="lineNum">     105</span>              :       typedef __gnu_cxx::__normal_iterator&lt;pointer, basic_string&gt;  iterator;</span>
<span id="L106"><span class="lineNum">     106</span>              :       typedef __gnu_cxx::__normal_iterator&lt;const_pointer, basic_string&gt;</span>
<span id="L107"><span class="lineNum">     107</span>              :                                                         const_iterator;</span>
<span id="L108"><span class="lineNum">     108</span>              :       typedef std::reverse_iterator&lt;const_iterator&gt;       const_reverse_iterator;</span>
<span id="L109"><span class="lineNum">     109</span>              :       typedef std::reverse_iterator&lt;iterator&gt;             reverse_iterator;</span>
<span id="L110"><span class="lineNum">     110</span>              : </span>
<span id="L111"><span class="lineNum">     111</span>              :       ///  Value returned by various member functions when they fail.</span>
<span id="L112"><span class="lineNum">     112</span>              :       static const size_type    npos = static_cast&lt;size_type&gt;(-1);</span>
<span id="L113"><span class="lineNum">     113</span>              : </span>
<span id="L114"><span class="lineNum">     114</span>              :     protected:</span>
<span id="L115"><span class="lineNum">     115</span>              :       // type used for positions in insert, erase etc.</span>
<span id="L116"><span class="lineNum">     116</span>              : #if __cplusplus &lt; 201103L</span>
<span id="L117"><span class="lineNum">     117</span>              :       typedef iterator __const_iterator;</span>
<span id="L118"><span class="lineNum">     118</span>              : #else</span>
<span id="L119"><span class="lineNum">     119</span>              :       typedef const_iterator __const_iterator;</span>
<span id="L120"><span class="lineNum">     120</span>              : #endif</span>
<span id="L121"><span class="lineNum">     121</span>              : </span>
<span id="L122"><span class="lineNum">     122</span>              :     private:</span>
<span id="L123"><span class="lineNum">     123</span>              :       static _GLIBCXX20_CONSTEXPR pointer</span>
<span id="L124"><span class="lineNum">     124</span>              :       _S_allocate(_Char_alloc_type&amp; __a, size_type __n)</span>
<span id="L125"><span class="lineNum">     125</span>              :       {</span>
<span id="L126"><span class="lineNum">     126</span>              :         pointer __p = _Alloc_traits::allocate(__a, __n);</span>
<span id="L127"><span class="lineNum">     127</span>              : #if __cpp_lib_constexpr_string &gt;= 201907L</span>
<span id="L128"><span class="lineNum">     128</span>              :         // std::char_traits begins the lifetime of characters,</span>
<span id="L129"><span class="lineNum">     129</span>              :         // but custom traits might not, so do it here.</span>
<span id="L130"><span class="lineNum">     130</span>              :         if constexpr (!is_same_v&lt;_Traits, char_traits&lt;_CharT&gt;&gt;)</span>
<span id="L131"><span class="lineNum">     131</span>              :           if (std::__is_constant_evaluated())</span>
<span id="L132"><span class="lineNum">     132</span>              :             // Begin the lifetime of characters in allocated storage.</span>
<span id="L133"><span class="lineNum">     133</span>              :             for (size_type __i = 0; __i &lt; __n; ++__i)</span>
<span id="L134"><span class="lineNum">     134</span>              :               std::construct_at(__builtin_addressof(__p[__i]));</span>
<span id="L135"><span class="lineNum">     135</span>              : #endif</span>
<span id="L136"><span class="lineNum">     136</span>              :         return __p;</span>
<span id="L137"><span class="lineNum">     137</span>              :       }</span>
<span id="L138"><span class="lineNum">     138</span>              : </span>
<span id="L139"><span class="lineNum">     139</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L140"><span class="lineNum">     140</span>              :       // A helper type for avoiding boiler-plate.</span>
<span id="L141"><span class="lineNum">     141</span>              :       typedef basic_string_view&lt;_CharT, _Traits&gt; __sv_type;</span>
<span id="L142"><span class="lineNum">     142</span>              : </span>
<span id="L143"><span class="lineNum">     143</span>              :       template&lt;typename _Tp, typename _Res&gt;</span>
<span id="L144"><span class="lineNum">     144</span>              :         using _If_sv = enable_if_t&lt;</span>
<span id="L145"><span class="lineNum">     145</span>              :           __and_&lt;is_convertible&lt;const _Tp&amp;, __sv_type&gt;,</span>
<span id="L146"><span class="lineNum">     146</span>              :                  __not_&lt;is_convertible&lt;const _Tp*, const basic_string*&gt;&gt;,</span>
<span id="L147"><span class="lineNum">     147</span>              :                  __not_&lt;is_convertible&lt;const _Tp&amp;, const _CharT*&gt;&gt;&gt;::value,</span>
<span id="L148"><span class="lineNum">     148</span>              :           _Res&gt;;</span>
<span id="L149"><span class="lineNum">     149</span>              : </span>
<span id="L150"><span class="lineNum">     150</span>              :       // Allows an implicit conversion to __sv_type.</span>
<span id="L151"><span class="lineNum">     151</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L152"><span class="lineNum">     152</span>              :       static __sv_type</span>
<span id="L153"><span class="lineNum">     153</span>              :       _S_to_string_view(__sv_type __svt) noexcept</span>
<span id="L154"><span class="lineNum">     154</span>              :       { return __svt; }</span>
<span id="L155"><span class="lineNum">     155</span>              : </span>
<span id="L156"><span class="lineNum">     156</span>              :       // Wraps a string_view by explicit conversion and thus</span>
<span id="L157"><span class="lineNum">     157</span>              :       // allows to add an internal constructor that does not</span>
<span id="L158"><span class="lineNum">     158</span>              :       // participate in overload resolution when a string_view</span>
<span id="L159"><span class="lineNum">     159</span>              :       // is provided.</span>
<span id="L160"><span class="lineNum">     160</span>              :       struct __sv_wrapper</span>
<span id="L161"><span class="lineNum">     161</span>              :       {</span>
<span id="L162"><span class="lineNum">     162</span>              :         _GLIBCXX20_CONSTEXPR explicit</span>
<span id="L163"><span class="lineNum">     163</span>              :         __sv_wrapper(__sv_type __sv) noexcept : _M_sv(__sv) { }</span>
<span id="L164"><span class="lineNum">     164</span>              : </span>
<span id="L165"><span class="lineNum">     165</span>              :         __sv_type _M_sv;</span>
<span id="L166"><span class="lineNum">     166</span>              :       };</span>
<span id="L167"><span class="lineNum">     167</span>              : </span>
<span id="L168"><span class="lineNum">     168</span>              :       /**</span>
<span id="L169"><span class="lineNum">     169</span>              :        *  @brief  Only internally used: Construct string from a string view</span>
<span id="L170"><span class="lineNum">     170</span>              :        *          wrapper.</span>
<span id="L171"><span class="lineNum">     171</span>              :        *  @param  __svw  string view wrapper.</span>
<span id="L172"><span class="lineNum">     172</span>              :        *  @param  __a  Allocator to use.</span>
<span id="L173"><span class="lineNum">     173</span>              :        */</span>
<span id="L174"><span class="lineNum">     174</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L175"><span class="lineNum">     175</span>              :       explicit</span>
<span id="L176"><span class="lineNum">     176</span>              :       basic_string(__sv_wrapper __svw, const _Alloc&amp; __a)</span>
<span id="L177"><span class="lineNum">     177</span>              :       : basic_string(__svw._M_sv.data(), __svw._M_sv.size(), __a) { }</span>
<span id="L178"><span class="lineNum">     178</span>              : #endif</span>
<span id="L179"><span class="lineNum">     179</span>              : </span>
<span id="L180"><span class="lineNum">     180</span>              :       // Use empty-base optimization: http://www.cantrip.org/emptyopt.html</span>
<span id="L181"><span class="lineNum">     181</span>              :       struct _Alloc_hider : allocator_type // TODO check __is_final</span>
<span id="L182"><span class="lineNum">     182</span>              :       {</span>
<span id="L183"><span class="lineNum">     183</span>              : #if __cplusplus &lt; 201103L</span>
<span id="L184"><span class="lineNum">     184</span>              :         _Alloc_hider(pointer __dat, const _Alloc&amp; __a = _Alloc())</span>
<span id="L185"><span class="lineNum">     185</span>              :         : allocator_type(__a), _M_p(__dat) { }</span>
<span id="L186"><span class="lineNum">     186</span>              : #else</span>
<span id="L187"><span class="lineNum">     187</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L188"><span class="lineNum">     188</span>              :         _Alloc_hider(pointer __dat, const _Alloc&amp; __a)</span>
<span id="L189"><span class="lineNum">     189</span>              :         : allocator_type(__a), _M_p(__dat) { }</span>
<span id="L190"><span class="lineNum">     190</span>              : </span>
<span id="L191"><span class="lineNum">     191</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L192"><span class="lineNum">     192</span>              :         _Alloc_hider(pointer __dat, _Alloc&amp;&amp; __a = _Alloc())</span>
<span id="L193"><span class="lineNum">     193</span>              :         : allocator_type(std::move(__a)), _M_p(__dat) { }</span>
<span id="L194"><span class="lineNum">     194</span>              : #endif</span>
<span id="L195"><span class="lineNum">     195</span>              : </span>
<span id="L196"><span class="lineNum">     196</span>              :         pointer _M_p; // The actual data.</span>
<span id="L197"><span class="lineNum">     197</span>              :       };</span>
<span id="L198"><span class="lineNum">     198</span>              : </span>
<span id="L199"><span class="lineNum">     199</span>              :       _Alloc_hider      _M_dataplus;</span>
<span id="L200"><span class="lineNum">     200</span>              :       size_type         _M_string_length;</span>
<span id="L201"><span class="lineNum">     201</span>              : </span>
<span id="L202"><span class="lineNum">     202</span>              :       enum { _S_local_capacity = 15 / sizeof(_CharT) };</span>
<span id="L203"><span class="lineNum">     203</span>              : </span>
<span id="L204"><span class="lineNum">     204</span>              :       union</span>
<span id="L205"><span class="lineNum">     205</span>              :       {</span>
<span id="L206"><span class="lineNum">     206</span>              :         _CharT           _M_local_buf[_S_local_capacity + 1];</span>
<span id="L207"><span class="lineNum">     207</span>              :         size_type        _M_allocated_capacity;</span>
<span id="L208"><span class="lineNum">     208</span>              :       };</span>
<span id="L209"><span class="lineNum">     209</span>              : </span>
<span id="L210"><span class="lineNum">     210</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L211"><span class="lineNum">     211</span>              :       void</span>
<span id="L212"><span class="lineNum">     212</span>              :       _M_data(pointer __p)</span>
<span id="L213"><span class="lineNum">     213</span>              :       { _M_dataplus._M_p = __p; }</span>
<span id="L214"><span class="lineNum">     214</span>              : </span>
<span id="L215"><span class="lineNum">     215</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L216"><span class="lineNum">     216</span>              :       void</span>
<span id="L217"><span class="lineNum">     217</span>              :       _M_length(size_type __length)</span>
<span id="L218"><span class="lineNum">     218</span>              :       { _M_string_length = __length; }</span>
<span id="L219"><span class="lineNum">     219</span>              : </span>
<span id="L220"><span class="lineNum">     220</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L221"><span class="lineNum">     221</span>              :       pointer</span>
<span id="L222"><span class="lineNum">     222</span>              :       _M_data() const</span>
<span id="L223"><span class="lineNum">     223</span>              :       { return _M_dataplus._M_p; }</span>
<span id="L224"><span class="lineNum">     224</span>              : </span>
<span id="L225"><span class="lineNum">     225</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L226"><span class="lineNum">     226</span>              :       pointer</span>
<span id="L227"><span class="lineNum">     227</span>              :       _M_local_data()</span>
<span id="L228"><span class="lineNum">     228</span>              :       {</span>
<span id="L229"><span class="lineNum">     229</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L230"><span class="lineNum">     230</span>              :         return std::pointer_traits&lt;pointer&gt;::pointer_to(*_M_local_buf);</span>
<span id="L231"><span class="lineNum">     231</span>              : #else</span>
<span id="L232"><span class="lineNum">     232</span>              :         return pointer(_M_local_buf);</span>
<span id="L233"><span class="lineNum">     233</span>              : #endif</span>
<span id="L234"><span class="lineNum">     234</span>              :       }</span>
<span id="L235"><span class="lineNum">     235</span>              : </span>
<span id="L236"><span class="lineNum">     236</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L237"><span class="lineNum">     237</span>              :       const_pointer</span>
<span id="L238"><span class="lineNum">     238</span>              :       _M_local_data() const</span>
<span id="L239"><span class="lineNum">     239</span>              :       {</span>
<span id="L240"><span class="lineNum">     240</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L241"><span class="lineNum">     241</span>              :         return std::pointer_traits&lt;const_pointer&gt;::pointer_to(*_M_local_buf);</span>
<span id="L242"><span class="lineNum">     242</span>              : #else</span>
<span id="L243"><span class="lineNum">     243</span>              :         return const_pointer(_M_local_buf);</span>
<span id="L244"><span class="lineNum">     244</span>              : #endif</span>
<span id="L245"><span class="lineNum">     245</span>              :       }</span>
<span id="L246"><span class="lineNum">     246</span>              : </span>
<span id="L247"><span class="lineNum">     247</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L248"><span class="lineNum">     248</span>              :       void</span>
<span id="L249"><span class="lineNum">     249</span>              :       _M_capacity(size_type __capacity)</span>
<span id="L250"><span class="lineNum">     250</span>              :       { _M_allocated_capacity = __capacity; }</span>
<span id="L251"><span class="lineNum">     251</span>              : </span>
<span id="L252"><span class="lineNum">     252</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L253"><span class="lineNum">     253</span>              :       void</span>
<span id="L254"><span class="lineNum">     254</span>              :       _M_set_length(size_type __n)</span>
<span id="L255"><span class="lineNum">     255</span>              :       {</span>
<span id="L256"><span class="lineNum">     256</span>              :         _M_length(__n);</span>
<span id="L257"><span class="lineNum">     257</span>              :         traits_type::assign(_M_data()[__n], _CharT());</span>
<span id="L258"><span class="lineNum">     258</span>              :       }</span>
<span id="L259"><span class="lineNum">     259</span>              : </span>
<span id="L260"><span class="lineNum">     260</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L261"><span class="lineNum">     261</span>              :       bool</span>
<span id="L262"><span class="lineNum">     262</span>              :       _M_is_local() const</span>
<span id="L263"><span class="lineNum">     263</span>              :       {</span>
<span id="L264"><span class="lineNum">     264</span>              :         if (_M_data() == _M_local_data())</span>
<span id="L265"><span class="lineNum">     265</span>              :           {</span>
<span id="L266"><span class="lineNum">     266</span>              :             if (_M_string_length &gt; _S_local_capacity)</span>
<span id="L267"><span class="lineNum">     267</span>              :               __builtin_unreachable();</span>
<span id="L268"><span class="lineNum">     268</span>              :             return true;</span>
<span id="L269"><span class="lineNum">     269</span>              :           }</span>
<span id="L270"><span class="lineNum">     270</span>              :         return false;</span>
<span id="L271"><span class="lineNum">     271</span>              :       }</span>
<span id="L272"><span class="lineNum">     272</span>              : </span>
<span id="L273"><span class="lineNum">     273</span>              :       // Create &amp; Destroy</span>
<span id="L274"><span class="lineNum">     274</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L275"><span class="lineNum">     275</span>              :       pointer</span>
<span id="L276"><span class="lineNum">     276</span>              :       _M_create(size_type&amp;, size_type);</span>
<span id="L277"><span class="lineNum">     277</span>              : </span>
<span id="L278"><span class="lineNum">     278</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L279"><span class="lineNum">     279</span>              :       void</span>
<span id="L280"><span class="lineNum">     280</span>              :       _M_dispose()</span>
<span id="L281"><span class="lineNum">     281</span>              :       {</span>
<span id="L282"><span class="lineNum">     282</span>              :         if (!_M_is_local())</span>
<span id="L283"><span class="lineNum">     283</span>              :           _M_destroy(_M_allocated_capacity);</span>
<span id="L284"><span class="lineNum">     284</span>              :       }</span>
<span id="L285"><span class="lineNum">     285</span>              : </span>
<span id="L286"><span class="lineNum">     286</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L287"><span class="lineNum">     287</span>              :       void</span>
<span id="L288"><span class="lineNum">     288</span>              :       _M_destroy(size_type __size) throw()</span>
<span id="L289"><span class="lineNum">     289</span>              :       { _Alloc_traits::deallocate(_M_get_allocator(), _M_data(), __size + 1); }</span>
<span id="L290"><span class="lineNum">     290</span>              : </span>
<span id="L291"><span class="lineNum">     291</span>              : #if __cplusplus &lt; 201103L || defined _GLIBCXX_DEFINING_STRING_INSTANTIATIONS</span>
<span id="L292"><span class="lineNum">     292</span>              :       // _M_construct_aux is used to implement the 21.3.1 para 15 which</span>
<span id="L293"><span class="lineNum">     293</span>              :       // requires special behaviour if _InIterator is an integral type</span>
<span id="L294"><span class="lineNum">     294</span>              :       template&lt;typename _InIterator&gt;</span>
<span id="L295"><span class="lineNum">     295</span>              :         void</span>
<span id="L296"><span class="lineNum">     296</span>              :         _M_construct_aux(_InIterator __beg, _InIterator __end,</span>
<span id="L297"><span class="lineNum">     297</span>              :                          std::__false_type)</span>
<span id="L298"><span class="lineNum">     298</span>              :         {</span>
<span id="L299"><span class="lineNum">     299</span>              :           typedef typename iterator_traits&lt;_InIterator&gt;::iterator_category _Tag;</span>
<span id="L300"><span class="lineNum">     300</span>              :           _M_construct(__beg, __end, _Tag());</span>
<span id="L301"><span class="lineNum">     301</span>              :         }</span>
<span id="L302"><span class="lineNum">     302</span>              : </span>
<span id="L303"><span class="lineNum">     303</span>              :       // _GLIBCXX_RESOLVE_LIB_DEFECTS</span>
<span id="L304"><span class="lineNum">     304</span>              :       // 438. Ambiguity in the &quot;do the right thing&quot; clause</span>
<span id="L305"><span class="lineNum">     305</span>              :       template&lt;typename _Integer&gt;</span>
<span id="L306"><span class="lineNum">     306</span>              :         void</span>
<span id="L307"><span class="lineNum">     307</span>              :         _M_construct_aux(_Integer __beg, _Integer __end, std::__true_type)</span>
<span id="L308"><span class="lineNum">     308</span>              :         { _M_construct_aux_2(static_cast&lt;size_type&gt;(__beg), __end); }</span>
<span id="L309"><span class="lineNum">     309</span>              : </span>
<span id="L310"><span class="lineNum">     310</span>              :       void</span>
<span id="L311"><span class="lineNum">     311</span>              :       _M_construct_aux_2(size_type __req, _CharT __c)</span>
<span id="L312"><span class="lineNum">     312</span>              :       { _M_construct(__req, __c); }</span>
<span id="L313"><span class="lineNum">     313</span>              : #endif</span>
<span id="L314"><span class="lineNum">     314</span>              : </span>
<span id="L315"><span class="lineNum">     315</span>              :       // For Input Iterators, used in istreambuf_iterators, etc.</span>
<span id="L316"><span class="lineNum">     316</span>              :       template&lt;typename _InIterator&gt;</span>
<span id="L317"><span class="lineNum">     317</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L318"><span class="lineNum">     318</span>              :         void</span>
<span id="L319"><span class="lineNum">     319</span>              :         _M_construct(_InIterator __beg, _InIterator __end,</span>
<span id="L320"><span class="lineNum">     320</span>              :                      std::input_iterator_tag);</span>
<span id="L321"><span class="lineNum">     321</span>              : </span>
<span id="L322"><span class="lineNum">     322</span>              :       // For forward_iterators up to random_access_iterators, used for</span>
<span id="L323"><span class="lineNum">     323</span>              :       // string::iterator, _CharT*, etc.</span>
<span id="L324"><span class="lineNum">     324</span>              :       template&lt;typename _FwdIterator&gt;</span>
<span id="L325"><span class="lineNum">     325</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L326"><span class="lineNum">     326</span>              :         void</span>
<span id="L327"><span class="lineNum">     327</span>              :         _M_construct(_FwdIterator __beg, _FwdIterator __end,</span>
<span id="L328"><span class="lineNum">     328</span>              :                      std::forward_iterator_tag);</span>
<span id="L329"><span class="lineNum">     329</span>              : </span>
<span id="L330"><span class="lineNum">     330</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L331"><span class="lineNum">     331</span>              :       void</span>
<span id="L332"><span class="lineNum">     332</span>              :       _M_construct(size_type __req, _CharT __c);</span>
<span id="L333"><span class="lineNum">     333</span>              : </span>
<span id="L334"><span class="lineNum">     334</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L335"><span class="lineNum">     335</span>              :       allocator_type&amp;</span>
<span id="L336"><span class="lineNum">     336</span>              :       _M_get_allocator()</span>
<span id="L337"><span class="lineNum">     337</span>              :       { return _M_dataplus; }</span>
<span id="L338"><span class="lineNum">     338</span>              : </span>
<span id="L339"><span class="lineNum">     339</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L340"><span class="lineNum">     340</span>              :       const allocator_type&amp;</span>
<span id="L341"><span class="lineNum">     341</span>              :       _M_get_allocator() const</span>
<span id="L342"><span class="lineNum">     342</span>              :       { return _M_dataplus; }</span>
<span id="L343"><span class="lineNum">     343</span>              : </span>
<span id="L344"><span class="lineNum">     344</span>              :       // Ensure that _M_local_buf is the active member of the union.</span>
<span id="L345"><span class="lineNum">     345</span>              :       __attribute__((__always_inline__))</span>
<span id="L346"><span class="lineNum">     346</span>              :       _GLIBCXX14_CONSTEXPR</span>
<span id="L347"><span class="lineNum">     347</span>              :       void</span>
<span id="L348"><span class="lineNum">     348</span>              :       _M_init_local_buf() _GLIBCXX_NOEXCEPT</span>
<span id="L349"><span class="lineNum">     349</span>              :       {</span>
<span id="L350"><span class="lineNum">     350</span>              : #if __cpp_lib_is_constant_evaluated</span>
<span id="L351"><span class="lineNum">     351</span>              :         if (std::is_constant_evaluated())</span>
<span id="L352"><span class="lineNum">     352</span>              :           for (size_type __i = 0; __i &lt;= _S_local_capacity; ++__i)</span>
<span id="L353"><span class="lineNum">     353</span>              :             _M_local_buf[__i] = _CharT();</span>
<span id="L354"><span class="lineNum">     354</span>              : #endif</span>
<span id="L355"><span class="lineNum">     355</span> <span class="tlaGNC tlaBgGNC">         423 :       }</span></span>
<span id="L356"><span class="lineNum">     356</span>              : </span>
<span id="L357"><span class="lineNum">     357</span>              :       __attribute__((__always_inline__))</span>
<span id="L358"><span class="lineNum">     358</span>              :       _GLIBCXX14_CONSTEXPR</span>
<span id="L359"><span class="lineNum">     359</span>              :       pointer</span>
<span id="L360"><span class="lineNum">     360</span>              :       _M_use_local_data() _GLIBCXX_NOEXCEPT</span>
<span id="L361"><span class="lineNum">     361</span>              :       {</span>
<span id="L362"><span class="lineNum">     362</span>              : #if __cpp_lib_is_constant_evaluated</span>
<span id="L363"><span class="lineNum">     363</span>              :         _M_init_local_buf();</span>
<span id="L364"><span class="lineNum">     364</span>              : #endif</span>
<span id="L365"><span class="lineNum">     365</span>              :         return _M_local_data();</span>
<span id="L366"><span class="lineNum">     366</span>              :       }</span>
<span id="L367"><span class="lineNum">     367</span>              : </span>
<span id="L368"><span class="lineNum">     368</span>              :     private:</span>
<span id="L369"><span class="lineNum">     369</span>              : </span>
<span id="L370"><span class="lineNum">     370</span>              : #ifdef _GLIBCXX_DISAMBIGUATE_REPLACE_INST</span>
<span id="L371"><span class="lineNum">     371</span>              :       // The explicit instantiations in misc-inst.cc require this due to</span>
<span id="L372"><span class="lineNum">     372</span>              :       // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64063</span>
<span id="L373"><span class="lineNum">     373</span>              :       template&lt;typename _Tp, bool _Requires =</span>
<span id="L374"><span class="lineNum">     374</span>              :                !__are_same&lt;_Tp, _CharT*&gt;::__value</span>
<span id="L375"><span class="lineNum">     375</span>              :                &amp;&amp; !__are_same&lt;_Tp, const _CharT*&gt;::__value</span>
<span id="L376"><span class="lineNum">     376</span>              :                &amp;&amp; !__are_same&lt;_Tp, iterator&gt;::__value</span>
<span id="L377"><span class="lineNum">     377</span>              :                &amp;&amp; !__are_same&lt;_Tp, const_iterator&gt;::__value&gt;</span>
<span id="L378"><span class="lineNum">     378</span>              :         struct __enable_if_not_native_iterator</span>
<span id="L379"><span class="lineNum">     379</span>              :         { typedef basic_string&amp; __type; };</span>
<span id="L380"><span class="lineNum">     380</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L381"><span class="lineNum">     381</span>              :         struct __enable_if_not_native_iterator&lt;_Tp, false&gt; { };</span>
<span id="L382"><span class="lineNum">     382</span>              : #endif</span>
<span id="L383"><span class="lineNum">     383</span>              : </span>
<span id="L384"><span class="lineNum">     384</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L385"><span class="lineNum">     385</span>              :       size_type</span>
<span id="L386"><span class="lineNum">     386</span>              :       _M_check(size_type __pos, const char* __s) const</span>
<span id="L387"><span class="lineNum">     387</span>              :       {</span>
<span id="L388"><span class="lineNum">     388</span>              :         if (__pos &gt; this-&gt;size())</span>
<span id="L389"><span class="lineNum">     389</span>              :           __throw_out_of_range_fmt(__N(&quot;%s: __pos (which is %zu) &gt; &quot;</span>
<span id="L390"><span class="lineNum">     390</span>              :                                        &quot;this-&gt;size() (which is %zu)&quot;),</span>
<span id="L391"><span class="lineNum">     391</span>              :                                    __s, __pos, this-&gt;size());</span>
<span id="L392"><span class="lineNum">     392</span>              :         return __pos;</span>
<span id="L393"><span class="lineNum">     393</span>              :       }</span>
<span id="L394"><span class="lineNum">     394</span>              : </span>
<span id="L395"><span class="lineNum">     395</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L396"><span class="lineNum">     396</span>              :       void</span>
<span id="L397"><span class="lineNum">     397</span>              :       _M_check_length(size_type __n1, size_type __n2, const char* __s) const</span>
<span id="L398"><span class="lineNum">     398</span>              :       {</span>
<span id="L399"><span class="lineNum">     399</span>              :         if (this-&gt;max_size() - (this-&gt;size() - __n1) &lt; __n2)</span>
<span id="L400"><span class="lineNum">     400</span>              :           __throw_length_error(__N(__s));</span>
<span id="L401"><span class="lineNum">     401</span>              :       }</span>
<span id="L402"><span class="lineNum">     402</span>              : </span>
<span id="L403"><span class="lineNum">     403</span>              : </span>
<span id="L404"><span class="lineNum">     404</span>              :       // NB: _M_limit doesn't check for a bad __pos value.</span>
<span id="L405"><span class="lineNum">     405</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L406"><span class="lineNum">     406</span>              :       size_type</span>
<span id="L407"><span class="lineNum">     407</span>              :       _M_limit(size_type __pos, size_type __off) const _GLIBCXX_NOEXCEPT</span>
<span id="L408"><span class="lineNum">     408</span>              :       {</span>
<span id="L409"><span class="lineNum">     409</span>              :         const bool __testoff =  __off &lt; this-&gt;size() - __pos;</span>
<span id="L410"><span class="lineNum">     410</span>              :         return __testoff ? __off : this-&gt;size() - __pos;</span>
<span id="L411"><span class="lineNum">     411</span>              :       }</span>
<span id="L412"><span class="lineNum">     412</span>              : </span>
<span id="L413"><span class="lineNum">     413</span>              :       // True if _Rep and source do not overlap.</span>
<span id="L414"><span class="lineNum">     414</span>              :       bool</span>
<span id="L415"><span class="lineNum">     415</span>              :       _M_disjunct(const _CharT* __s) const _GLIBCXX_NOEXCEPT</span>
<span id="L416"><span class="lineNum">     416</span>              :       {</span>
<span id="L417"><span class="lineNum">     417</span>              :         return (less&lt;const _CharT*&gt;()(__s, _M_data())</span>
<span id="L418"><span class="lineNum">     418</span>              :                 || less&lt;const _CharT*&gt;()(_M_data() + this-&gt;size(), __s));</span>
<span id="L419"><span class="lineNum">     419</span>              :       }</span>
<span id="L420"><span class="lineNum">     420</span>              : </span>
<span id="L421"><span class="lineNum">     421</span>              :       // When __n = 1 way faster than the general multichar</span>
<span id="L422"><span class="lineNum">     422</span>              :       // traits_type::copy/move/assign.</span>
<span id="L423"><span class="lineNum">     423</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L424"><span class="lineNum">     424</span>              :       static void</span>
<span id="L425"><span class="lineNum">     425</span>              :       _S_copy(_CharT* __d, const _CharT* __s, size_type __n)</span>
<span id="L426"><span class="lineNum">     426</span>              :       {</span>
<span id="L427"><span class="lineNum">     427</span>              :         if (__n == 1)</span>
<span id="L428"><span class="lineNum">     428</span>              :           traits_type::assign(*__d, *__s);</span>
<span id="L429"><span class="lineNum">     429</span>              :         else</span>
<span id="L430"><span class="lineNum">     430</span>              :           traits_type::copy(__d, __s, __n);</span>
<span id="L431"><span class="lineNum">     431</span>              :       }</span>
<span id="L432"><span class="lineNum">     432</span>              : </span>
<span id="L433"><span class="lineNum">     433</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L434"><span class="lineNum">     434</span>              :       static void</span>
<span id="L435"><span class="lineNum">     435</span>              :       _S_move(_CharT* __d, const _CharT* __s, size_type __n)</span>
<span id="L436"><span class="lineNum">     436</span>              :       {</span>
<span id="L437"><span class="lineNum">     437</span>              :         if (__n == 1)</span>
<span id="L438"><span class="lineNum">     438</span>              :           traits_type::assign(*__d, *__s);</span>
<span id="L439"><span class="lineNum">     439</span>              :         else</span>
<span id="L440"><span class="lineNum">     440</span>              :           traits_type::move(__d, __s, __n);</span>
<span id="L441"><span class="lineNum">     441</span>              :       }</span>
<span id="L442"><span class="lineNum">     442</span>              : </span>
<span id="L443"><span class="lineNum">     443</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L444"><span class="lineNum">     444</span>              :       static void</span>
<span id="L445"><span class="lineNum">     445</span>              :       _S_assign(_CharT* __d, size_type __n, _CharT __c)</span>
<span id="L446"><span class="lineNum">     446</span>              :       {</span>
<span id="L447"><span class="lineNum">     447</span>              :         if (__n == 1)</span>
<span id="L448"><span class="lineNum">     448</span>              :           traits_type::assign(*__d, __c);</span>
<span id="L449"><span class="lineNum">     449</span>              :         else</span>
<span id="L450"><span class="lineNum">     450</span>              :           traits_type::assign(__d, __n, __c);</span>
<span id="L451"><span class="lineNum">     451</span>              :       }</span>
<span id="L452"><span class="lineNum">     452</span>              : </span>
<span id="L453"><span class="lineNum">     453</span>              :       // _S_copy_chars is a separate template to permit specialization</span>
<span id="L454"><span class="lineNum">     454</span>              :       // to optimize for the common case of pointers as iterators.</span>
<span id="L455"><span class="lineNum">     455</span>              :       template&lt;class _Iterator&gt;</span>
<span id="L456"><span class="lineNum">     456</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L457"><span class="lineNum">     457</span>              :         static void</span>
<span id="L458"><span class="lineNum">     458</span>              :         _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2)</span>
<span id="L459"><span class="lineNum">     459</span>              :         {</span>
<span id="L460"><span class="lineNum">     460</span>              :           for (; __k1 != __k2; ++__k1, (void)++__p)</span>
<span id="L461"><span class="lineNum">     461</span>              :             traits_type::assign(*__p, *__k1); // These types are off.</span>
<span id="L462"><span class="lineNum">     462</span>              :         }</span>
<span id="L463"><span class="lineNum">     463</span>              : </span>
<span id="L464"><span class="lineNum">     464</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L465"><span class="lineNum">     465</span>              :       static void</span>
<span id="L466"><span class="lineNum">     466</span>              :       _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) _GLIBCXX_NOEXCEPT</span>
<span id="L467"><span class="lineNum">     467</span>              :       { _S_copy_chars(__p, __k1.base(), __k2.base()); }</span>
<span id="L468"><span class="lineNum">     468</span>              : </span>
<span id="L469"><span class="lineNum">     469</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L470"><span class="lineNum">     470</span>              :       static void</span>
<span id="L471"><span class="lineNum">     471</span>              :       _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2)</span>
<span id="L472"><span class="lineNum">     472</span>              :       _GLIBCXX_NOEXCEPT</span>
<span id="L473"><span class="lineNum">     473</span>              :       { _S_copy_chars(__p, __k1.base(), __k2.base()); }</span>
<span id="L474"><span class="lineNum">     474</span>              : </span>
<span id="L475"><span class="lineNum">     475</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L476"><span class="lineNum">     476</span>              :       static void</span>
<span id="L477"><span class="lineNum">     477</span>              :       _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) _GLIBCXX_NOEXCEPT</span>
<span id="L478"><span class="lineNum">     478</span>              :       { _S_copy(__p, __k1, __k2 - __k1); }</span>
<span id="L479"><span class="lineNum">     479</span>              : </span>
<span id="L480"><span class="lineNum">     480</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L481"><span class="lineNum">     481</span>              :       static void</span>
<span id="L482"><span class="lineNum">     482</span>              :       _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2)</span>
<span id="L483"><span class="lineNum">     483</span>              :       _GLIBCXX_NOEXCEPT</span>
<span id="L484"><span class="lineNum">     484</span>              :       { _S_copy(__p, __k1, __k2 - __k1); }</span>
<span id="L485"><span class="lineNum">     485</span>              : </span>
<span id="L486"><span class="lineNum">     486</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L487"><span class="lineNum">     487</span>              :       static int</span>
<span id="L488"><span class="lineNum">     488</span>              :       _S_compare(size_type __n1, size_type __n2) _GLIBCXX_NOEXCEPT</span>
<span id="L489"><span class="lineNum">     489</span>              :       {</span>
<span id="L490"><span class="lineNum">     490</span>              :         const difference_type __d = difference_type(__n1 - __n2);</span>
<span id="L491"><span class="lineNum">     491</span>              : </span>
<span id="L492"><span class="lineNum">     492</span>              :         if (__d &gt; __gnu_cxx::__numeric_traits&lt;int&gt;::__max)</span>
<span id="L493"><span class="lineNum">     493</span>              :           return __gnu_cxx::__numeric_traits&lt;int&gt;::__max;</span>
<span id="L494"><span class="lineNum">     494</span>              :         else if (__d &lt; __gnu_cxx::__numeric_traits&lt;int&gt;::__min)</span>
<span id="L495"><span class="lineNum">     495</span>              :           return __gnu_cxx::__numeric_traits&lt;int&gt;::__min;</span>
<span id="L496"><span class="lineNum">     496</span>              :         else</span>
<span id="L497"><span class="lineNum">     497</span>              :           return int(__d);</span>
<span id="L498"><span class="lineNum">     498</span>              :       }</span>
<span id="L499"><span class="lineNum">     499</span>              : </span>
<span id="L500"><span class="lineNum">     500</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L501"><span class="lineNum">     501</span>              :       void</span>
<span id="L502"><span class="lineNum">     502</span>              :       _M_assign(const basic_string&amp;);</span>
<span id="L503"><span class="lineNum">     503</span>              : </span>
<span id="L504"><span class="lineNum">     504</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L505"><span class="lineNum">     505</span>              :       void</span>
<span id="L506"><span class="lineNum">     506</span>              :       _M_mutate(size_type __pos, size_type __len1, const _CharT* __s,</span>
<span id="L507"><span class="lineNum">     507</span>              :                 size_type __len2);</span>
<span id="L508"><span class="lineNum">     508</span>              : </span>
<span id="L509"><span class="lineNum">     509</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L510"><span class="lineNum">     510</span>              :       void</span>
<span id="L511"><span class="lineNum">     511</span>              :       _M_erase(size_type __pos, size_type __n);</span>
<span id="L512"><span class="lineNum">     512</span>              : </span>
<span id="L513"><span class="lineNum">     513</span>              :     public:</span>
<span id="L514"><span class="lineNum">     514</span>              :       // Construct/copy/destroy:</span>
<span id="L515"><span class="lineNum">     515</span>              :       // NB: We overload ctors in some cases instead of using default</span>
<span id="L516"><span class="lineNum">     516</span>              :       // arguments, per 17.4.4.4 para. 2 item 2.</span>
<span id="L517"><span class="lineNum">     517</span>              : </span>
<span id="L518"><span class="lineNum">     518</span>              :       /**</span>
<span id="L519"><span class="lineNum">     519</span>              :        *  @brief  Default constructor creates an empty string.</span>
<span id="L520"><span class="lineNum">     520</span>              :        */</span>
<span id="L521"><span class="lineNum">     521</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L522"><span class="lineNum">     522</span>              :       basic_string()</span>
<span id="L523"><span class="lineNum">     523</span>              :       _GLIBCXX_NOEXCEPT_IF(is_nothrow_default_constructible&lt;_Alloc&gt;::value)</span>
<span id="L524"><span class="lineNum">     524</span>              :       : _M_dataplus(_M_local_data())</span>
<span id="L525"><span class="lineNum">     525</span>              :       {</span>
<span id="L526"><span class="lineNum">     526</span>              :         _M_init_local_buf();</span>
<span id="L527"><span class="lineNum">     527</span>              :         _M_set_length(0);</span>
<span id="L528"><span class="lineNum">     528</span>              :       }</span>
<span id="L529"><span class="lineNum">     529</span>              : </span>
<span id="L530"><span class="lineNum">     530</span>              :       /**</span>
<span id="L531"><span class="lineNum">     531</span>              :        *  @brief  Construct an empty string using allocator @a a.</span>
<span id="L532"><span class="lineNum">     532</span>              :        */</span>
<span id="L533"><span class="lineNum">     533</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L534"><span class="lineNum">     534</span>              :       explicit</span>
<span id="L535"><span class="lineNum">     535</span>              :       basic_string(const _Alloc&amp; __a) _GLIBCXX_NOEXCEPT</span>
<span id="L536"><span class="lineNum">     536</span>              :       : _M_dataplus(_M_local_data(), __a)</span>
<span id="L537"><span class="lineNum">     537</span>              :       {</span>
<span id="L538"><span class="lineNum">     538</span>              :         _M_init_local_buf();</span>
<span id="L539"><span class="lineNum">     539</span>              :         _M_set_length(0);</span>
<span id="L540"><span class="lineNum">     540</span>              :       }</span>
<span id="L541"><span class="lineNum">     541</span>              : </span>
<span id="L542"><span class="lineNum">     542</span>              :       /**</span>
<span id="L543"><span class="lineNum">     543</span>              :        *  @brief  Construct string with copy of value of @a __str.</span>
<span id="L544"><span class="lineNum">     544</span>              :        *  @param  __str  Source string.</span>
<span id="L545"><span class="lineNum">     545</span>              :        */</span>
<span id="L546"><span class="lineNum">     546</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L547"><span class="lineNum">     547</span>              :       basic_string(const basic_string&amp; __str)</span>
<span id="L548"><span class="lineNum">     548</span>              :       : _M_dataplus(_M_local_data(),</span>
<span id="L549"><span class="lineNum">     549</span>              :                     _Alloc_traits::_S_select_on_copy(__str._M_get_allocator()))</span>
<span id="L550"><span class="lineNum">     550</span>              :       {</span>
<span id="L551"><span class="lineNum">     551</span>              :         _M_construct(__str._M_data(), __str._M_data() + __str.length(),</span>
<span id="L552"><span class="lineNum">     552</span>              :                      std::forward_iterator_tag());</span>
<span id="L553"><span class="lineNum">     553</span>              :       }</span>
<span id="L554"><span class="lineNum">     554</span>              : </span>
<span id="L555"><span class="lineNum">     555</span>              :       // _GLIBCXX_RESOLVE_LIB_DEFECTS</span>
<span id="L556"><span class="lineNum">     556</span>              :       // 2583. no way to supply an allocator for basic_string(str, pos)</span>
<span id="L557"><span class="lineNum">     557</span>              :       /**</span>
<span id="L558"><span class="lineNum">     558</span>              :        *  @brief  Construct string as copy of a substring.</span>
<span id="L559"><span class="lineNum">     559</span>              :        *  @param  __str  Source string.</span>
<span id="L560"><span class="lineNum">     560</span>              :        *  @param  __pos  Index of first character to copy from.</span>
<span id="L561"><span class="lineNum">     561</span>              :        *  @param  __a  Allocator to use.</span>
<span id="L562"><span class="lineNum">     562</span>              :        */</span>
<span id="L563"><span class="lineNum">     563</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L564"><span class="lineNum">     564</span>              :       basic_string(const basic_string&amp; __str, size_type __pos,</span>
<span id="L565"><span class="lineNum">     565</span>              :                    const _Alloc&amp; __a = _Alloc())</span>
<span id="L566"><span class="lineNum">     566</span>              :       : _M_dataplus(_M_local_data(), __a)</span>
<span id="L567"><span class="lineNum">     567</span>              :       {</span>
<span id="L568"><span class="lineNum">     568</span>              :         const _CharT* __start = __str._M_data()</span>
<span id="L569"><span class="lineNum">     569</span>              :           + __str._M_check(__pos, &quot;basic_string::basic_string&quot;);</span>
<span id="L570"><span class="lineNum">     570</span>              :         _M_construct(__start, __start + __str._M_limit(__pos, npos),</span>
<span id="L571"><span class="lineNum">     571</span>              :                      std::forward_iterator_tag());</span>
<span id="L572"><span class="lineNum">     572</span>              :       }</span>
<span id="L573"><span class="lineNum">     573</span>              : </span>
<span id="L574"><span class="lineNum">     574</span>              :       /**</span>
<span id="L575"><span class="lineNum">     575</span>              :        *  @brief  Construct string as copy of a substring.</span>
<span id="L576"><span class="lineNum">     576</span>              :        *  @param  __str  Source string.</span>
<span id="L577"><span class="lineNum">     577</span>              :        *  @param  __pos  Index of first character to copy from.</span>
<span id="L578"><span class="lineNum">     578</span>              :        *  @param  __n  Number of characters to copy.</span>
<span id="L579"><span class="lineNum">     579</span>              :        */</span>
<span id="L580"><span class="lineNum">     580</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L581"><span class="lineNum">     581</span>              :       basic_string(const basic_string&amp; __str, size_type __pos,</span>
<span id="L582"><span class="lineNum">     582</span>              :                    size_type __n)</span>
<span id="L583"><span class="lineNum">     583</span>              :       : _M_dataplus(_M_local_data())</span>
<span id="L584"><span class="lineNum">     584</span>              :       {</span>
<span id="L585"><span class="lineNum">     585</span>              :         const _CharT* __start = __str._M_data()</span>
<span id="L586"><span class="lineNum">     586</span>              :           + __str._M_check(__pos, &quot;basic_string::basic_string&quot;);</span>
<span id="L587"><span class="lineNum">     587</span>              :         _M_construct(__start, __start + __str._M_limit(__pos, __n),</span>
<span id="L588"><span class="lineNum">     588</span>              :                      std::forward_iterator_tag());</span>
<span id="L589"><span class="lineNum">     589</span>              :       }</span>
<span id="L590"><span class="lineNum">     590</span>              : </span>
<span id="L591"><span class="lineNum">     591</span>              :       /**</span>
<span id="L592"><span class="lineNum">     592</span>              :        *  @brief  Construct string as copy of a substring.</span>
<span id="L593"><span class="lineNum">     593</span>              :        *  @param  __str  Source string.</span>
<span id="L594"><span class="lineNum">     594</span>              :        *  @param  __pos  Index of first character to copy from.</span>
<span id="L595"><span class="lineNum">     595</span>              :        *  @param  __n  Number of characters to copy.</span>
<span id="L596"><span class="lineNum">     596</span>              :        *  @param  __a  Allocator to use.</span>
<span id="L597"><span class="lineNum">     597</span>              :        */</span>
<span id="L598"><span class="lineNum">     598</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L599"><span class="lineNum">     599</span>              :       basic_string(const basic_string&amp; __str, size_type __pos,</span>
<span id="L600"><span class="lineNum">     600</span>              :                    size_type __n, const _Alloc&amp; __a)</span>
<span id="L601"><span class="lineNum">     601</span>              :       : _M_dataplus(_M_local_data(), __a)</span>
<span id="L602"><span class="lineNum">     602</span>              :       {</span>
<span id="L603"><span class="lineNum">     603</span>              :         const _CharT* __start</span>
<span id="L604"><span class="lineNum">     604</span>              :           = __str._M_data() + __str._M_check(__pos, &quot;string::string&quot;);</span>
<span id="L605"><span class="lineNum">     605</span>              :         _M_construct(__start, __start + __str._M_limit(__pos, __n),</span>
<span id="L606"><span class="lineNum">     606</span>              :                      std::forward_iterator_tag());</span>
<span id="L607"><span class="lineNum">     607</span>              :       }</span>
<span id="L608"><span class="lineNum">     608</span>              : </span>
<span id="L609"><span class="lineNum">     609</span>              :       /**</span>
<span id="L610"><span class="lineNum">     610</span>              :        *  @brief  Construct string initialized by a character %array.</span>
<span id="L611"><span class="lineNum">     611</span>              :        *  @param  __s  Source character %array.</span>
<span id="L612"><span class="lineNum">     612</span>              :        *  @param  __n  Number of characters to copy.</span>
<span id="L613"><span class="lineNum">     613</span>              :        *  @param  __a  Allocator to use (default is default allocator).</span>
<span id="L614"><span class="lineNum">     614</span>              :        *</span>
<span id="L615"><span class="lineNum">     615</span>              :        *  NB: @a __s must have at least @a __n characters, &amp;apos;\\0&amp;apos;</span>
<span id="L616"><span class="lineNum">     616</span>              :        *  has no special meaning.</span>
<span id="L617"><span class="lineNum">     617</span>              :        */</span>
<span id="L618"><span class="lineNum">     618</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L619"><span class="lineNum">     619</span>              :       basic_string(const _CharT* __s, size_type __n,</span>
<span id="L620"><span class="lineNum">     620</span>              :                    const _Alloc&amp; __a = _Alloc())</span>
<span id="L621"><span class="lineNum">     621</span>              :       : _M_dataplus(_M_local_data(), __a)</span>
<span id="L622"><span class="lineNum">     622</span>              :       {</span>
<span id="L623"><span class="lineNum">     623</span>              :         // NB: Not required, but considered best practice.</span>
<span id="L624"><span class="lineNum">     624</span>              :         if (__s == 0 &amp;&amp; __n &gt; 0)</span>
<span id="L625"><span class="lineNum">     625</span>              :           std::__throw_logic_error(__N(&quot;basic_string: &quot;</span>
<span id="L626"><span class="lineNum">     626</span>              :                                        &quot;construction from null is not valid&quot;));</span>
<span id="L627"><span class="lineNum">     627</span>              :         _M_construct(__s, __s + __n, std::forward_iterator_tag());</span>
<span id="L628"><span class="lineNum">     628</span>              :       }</span>
<span id="L629"><span class="lineNum">     629</span>              : </span>
<span id="L630"><span class="lineNum">     630</span>              :       /**</span>
<span id="L631"><span class="lineNum">     631</span>              :        *  @brief  Construct string as copy of a C string.</span>
<span id="L632"><span class="lineNum">     632</span>              :        *  @param  __s  Source C string.</span>
<span id="L633"><span class="lineNum">     633</span>              :        *  @param  __a  Allocator to use (default is default allocator).</span>
<span id="L634"><span class="lineNum">     634</span>              :        */</span>
<span id="L635"><span class="lineNum">     635</span>              : #if __cpp_deduction_guides &amp;&amp; ! defined _GLIBCXX_DEFINING_STRING_INSTANTIATIONS</span>
<span id="L636"><span class="lineNum">     636</span>              :       // _GLIBCXX_RESOLVE_LIB_DEFECTS</span>
<span id="L637"><span class="lineNum">     637</span>              :       // 3076. basic_string CTAD ambiguity</span>
<span id="L638"><span class="lineNum">     638</span>              :       template&lt;typename = _RequireAllocator&lt;_Alloc&gt;&gt;</span>
<span id="L639"><span class="lineNum">     639</span>              : #endif</span>
<span id="L640"><span class="lineNum">     640</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L641"><span class="lineNum">     641</span> <span class="tlaGNC">          61 :       basic_string(const _CharT* __s, const _Alloc&amp; __a = _Alloc())</span></span>
<span id="L642"><span class="lineNum">     642</span> <span class="tlaGNC">          61 :       : _M_dataplus(_M_local_data(), __a)</span></span>
<span id="L643"><span class="lineNum">     643</span>              :       {</span>
<span id="L644"><span class="lineNum">     644</span>              :         // NB: Not required, but considered best practice.</span>
<span id="L645"><span class="lineNum">     645</span> <span class="tlaGNC">          61 :         if (__s == 0)</span></span>
<span id="L646"><span class="lineNum">     646</span> <span class="tlaUNC tlaBgUNC">           0 :           std::__throw_logic_error(__N(&quot;basic_string: &quot;</span></span>
<span id="L647"><span class="lineNum">     647</span>              :                                        &quot;construction from null is not valid&quot;));</span>
<span id="L648"><span class="lineNum">     648</span> <span class="tlaGNC tlaBgGNC">          61 :         const _CharT* __end = __s + traits_type::length(__s);</span></span>
<span id="L649"><span class="lineNum">     649</span> <span class="tlaGNC">          61 :         _M_construct(__s, __end, forward_iterator_tag());</span></span>
<span id="L650"><span class="lineNum">     650</span> <span class="tlaGNC">          61 :       }</span></span>
<span id="L651"><span class="lineNum">     651</span>              : </span>
<span id="L652"><span class="lineNum">     652</span>              :       /**</span>
<span id="L653"><span class="lineNum">     653</span>              :        *  @brief  Construct string as multiple characters.</span>
<span id="L654"><span class="lineNum">     654</span>              :        *  @param  __n  Number of characters.</span>
<span id="L655"><span class="lineNum">     655</span>              :        *  @param  __c  Character to use.</span>
<span id="L656"><span class="lineNum">     656</span>              :        *  @param  __a  Allocator to use (default is default allocator).</span>
<span id="L657"><span class="lineNum">     657</span>              :        */</span>
<span id="L658"><span class="lineNum">     658</span>              : #if __cpp_deduction_guides &amp;&amp; ! defined _GLIBCXX_DEFINING_STRING_INSTANTIATIONS</span>
<span id="L659"><span class="lineNum">     659</span>              :       // _GLIBCXX_RESOLVE_LIB_DEFECTS</span>
<span id="L660"><span class="lineNum">     660</span>              :       // 3076. basic_string CTAD ambiguity</span>
<span id="L661"><span class="lineNum">     661</span>              :       template&lt;typename = _RequireAllocator&lt;_Alloc&gt;&gt;</span>
<span id="L662"><span class="lineNum">     662</span>              : #endif</span>
<span id="L663"><span class="lineNum">     663</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L664"><span class="lineNum">     664</span>              :       basic_string(size_type __n, _CharT __c, const _Alloc&amp; __a = _Alloc())</span>
<span id="L665"><span class="lineNum">     665</span>              :       : _M_dataplus(_M_local_data(), __a)</span>
<span id="L666"><span class="lineNum">     666</span>              :       { _M_construct(__n, __c); }</span>
<span id="L667"><span class="lineNum">     667</span>              : </span>
<span id="L668"><span class="lineNum">     668</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L669"><span class="lineNum">     669</span>              :       /**</span>
<span id="L670"><span class="lineNum">     670</span>              :        *  @brief  Move construct string.</span>
<span id="L671"><span class="lineNum">     671</span>              :        *  @param  __str  Source string.</span>
<span id="L672"><span class="lineNum">     672</span>              :        *</span>
<span id="L673"><span class="lineNum">     673</span>              :        *  The newly-created string contains the exact contents of @a __str.</span>
<span id="L674"><span class="lineNum">     674</span>              :        *  @a __str is a valid, but unspecified string.</span>
<span id="L675"><span class="lineNum">     675</span>              :        */</span>
<span id="L676"><span class="lineNum">     676</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L677"><span class="lineNum">     677</span>              :       basic_string(basic_string&amp;&amp; __str) noexcept</span>
<span id="L678"><span class="lineNum">     678</span>              :       : _M_dataplus(_M_local_data(), std::move(__str._M_get_allocator()))</span>
<span id="L679"><span class="lineNum">     679</span>              :       {</span>
<span id="L680"><span class="lineNum">     680</span>              :         if (__str._M_is_local())</span>
<span id="L681"><span class="lineNum">     681</span>              :           {</span>
<span id="L682"><span class="lineNum">     682</span>              :             _M_init_local_buf();</span>
<span id="L683"><span class="lineNum">     683</span>              :             traits_type::copy(_M_local_buf, __str._M_local_buf,</span>
<span id="L684"><span class="lineNum">     684</span>              :                               __str.length() + 1);</span>
<span id="L685"><span class="lineNum">     685</span>              :           }</span>
<span id="L686"><span class="lineNum">     686</span>              :         else</span>
<span id="L687"><span class="lineNum">     687</span>              :           {</span>
<span id="L688"><span class="lineNum">     688</span>              :             _M_data(__str._M_data());</span>
<span id="L689"><span class="lineNum">     689</span>              :             _M_capacity(__str._M_allocated_capacity);</span>
<span id="L690"><span class="lineNum">     690</span>              :           }</span>
<span id="L691"><span class="lineNum">     691</span>              : </span>
<span id="L692"><span class="lineNum">     692</span>              :         // Must use _M_length() here not _M_set_length() because</span>
<span id="L693"><span class="lineNum">     693</span>              :         // basic_stringbuf relies on writing into unallocated capacity so</span>
<span id="L694"><span class="lineNum">     694</span>              :         // we mess up the contents if we put a '\0' in the string.</span>
<span id="L695"><span class="lineNum">     695</span>              :         _M_length(__str.length());</span>
<span id="L696"><span class="lineNum">     696</span>              :         __str._M_data(__str._M_use_local_data());</span>
<span id="L697"><span class="lineNum">     697</span>              :         __str._M_set_length(0);</span>
<span id="L698"><span class="lineNum">     698</span>              :       }</span>
<span id="L699"><span class="lineNum">     699</span>              : </span>
<span id="L700"><span class="lineNum">     700</span>              :       /**</span>
<span id="L701"><span class="lineNum">     701</span>              :        *  @brief  Construct string from an initializer %list.</span>
<span id="L702"><span class="lineNum">     702</span>              :        *  @param  __l  std::initializer_list of characters.</span>
<span id="L703"><span class="lineNum">     703</span>              :        *  @param  __a  Allocator to use (default is default allocator).</span>
<span id="L704"><span class="lineNum">     704</span>              :        */</span>
<span id="L705"><span class="lineNum">     705</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L706"><span class="lineNum">     706</span>              :       basic_string(initializer_list&lt;_CharT&gt; __l, const _Alloc&amp; __a = _Alloc())</span>
<span id="L707"><span class="lineNum">     707</span>              :       : _M_dataplus(_M_local_data(), __a)</span>
<span id="L708"><span class="lineNum">     708</span>              :       { _M_construct(__l.begin(), __l.end(), std::forward_iterator_tag()); }</span>
<span id="L709"><span class="lineNum">     709</span>              : </span>
<span id="L710"><span class="lineNum">     710</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L711"><span class="lineNum">     711</span>              :       basic_string(const basic_string&amp; __str, const _Alloc&amp; __a)</span>
<span id="L712"><span class="lineNum">     712</span>              :       : _M_dataplus(_M_local_data(), __a)</span>
<span id="L713"><span class="lineNum">     713</span>              :       { _M_construct(__str.begin(), __str.end(), std::forward_iterator_tag()); }</span>
<span id="L714"><span class="lineNum">     714</span>              : </span>
<span id="L715"><span class="lineNum">     715</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L716"><span class="lineNum">     716</span>              :       basic_string(basic_string&amp;&amp; __str, const _Alloc&amp; __a)</span>
<span id="L717"><span class="lineNum">     717</span>              :       noexcept(_Alloc_traits::_S_always_equal())</span>
<span id="L718"><span class="lineNum">     718</span>              :       : _M_dataplus(_M_local_data(), __a)</span>
<span id="L719"><span class="lineNum">     719</span>              :       {</span>
<span id="L720"><span class="lineNum">     720</span>              :         if (__str._M_is_local())</span>
<span id="L721"><span class="lineNum">     721</span>              :           {</span>
<span id="L722"><span class="lineNum">     722</span>              :             _M_init_local_buf();</span>
<span id="L723"><span class="lineNum">     723</span>              :             traits_type::copy(_M_local_buf, __str._M_local_buf,</span>
<span id="L724"><span class="lineNum">     724</span>              :                               __str.length() + 1);</span>
<span id="L725"><span class="lineNum">     725</span>              :             _M_length(__str.length());</span>
<span id="L726"><span class="lineNum">     726</span>              :             __str._M_set_length(0);</span>
<span id="L727"><span class="lineNum">     727</span>              :           }</span>
<span id="L728"><span class="lineNum">     728</span>              :         else if (_Alloc_traits::_S_always_equal()</span>
<span id="L729"><span class="lineNum">     729</span>              :             || __str.get_allocator() == __a)</span>
<span id="L730"><span class="lineNum">     730</span>              :           {</span>
<span id="L731"><span class="lineNum">     731</span>              :             _M_data(__str._M_data());</span>
<span id="L732"><span class="lineNum">     732</span>              :             _M_length(__str.length());</span>
<span id="L733"><span class="lineNum">     733</span>              :             _M_capacity(__str._M_allocated_capacity);</span>
<span id="L734"><span class="lineNum">     734</span>              :             __str._M_data(__str._M_use_local_data());</span>
<span id="L735"><span class="lineNum">     735</span>              :             __str._M_set_length(0);</span>
<span id="L736"><span class="lineNum">     736</span>              :           }</span>
<span id="L737"><span class="lineNum">     737</span>              :         else</span>
<span id="L738"><span class="lineNum">     738</span>              :           _M_construct(__str.begin(), __str.end(), std::forward_iterator_tag());</span>
<span id="L739"><span class="lineNum">     739</span>              :       }</span>
<span id="L740"><span class="lineNum">     740</span>              : #endif // C++11</span>
<span id="L741"><span class="lineNum">     741</span>              : </span>
<span id="L742"><span class="lineNum">     742</span>              : #if __cplusplus &gt;= 202100L</span>
<span id="L743"><span class="lineNum">     743</span>              :       basic_string(nullptr_t) = delete;</span>
<span id="L744"><span class="lineNum">     744</span>              :       basic_string&amp; operator=(nullptr_t) = delete;</span>
<span id="L745"><span class="lineNum">     745</span>              : #endif // C++23</span>
<span id="L746"><span class="lineNum">     746</span>              : </span>
<span id="L747"><span class="lineNum">     747</span>              :       /**</span>
<span id="L748"><span class="lineNum">     748</span>              :        *  @brief  Construct string as copy of a range.</span>
<span id="L749"><span class="lineNum">     749</span>              :        *  @param  __beg  Start of range.</span>
<span id="L750"><span class="lineNum">     750</span>              :        *  @param  __end  End of range.</span>
<span id="L751"><span class="lineNum">     751</span>              :        *  @param  __a  Allocator to use (default is default allocator).</span>
<span id="L752"><span class="lineNum">     752</span>              :        */</span>
<span id="L753"><span class="lineNum">     753</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L754"><span class="lineNum">     754</span>              :       template&lt;typename _InputIterator,</span>
<span id="L755"><span class="lineNum">     755</span>              :                typename = std::_RequireInputIter&lt;_InputIterator&gt;&gt;</span>
<span id="L756"><span class="lineNum">     756</span>              : #else</span>
<span id="L757"><span class="lineNum">     757</span>              :       template&lt;typename _InputIterator&gt;</span>
<span id="L758"><span class="lineNum">     758</span>              : #endif</span>
<span id="L759"><span class="lineNum">     759</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L760"><span class="lineNum">     760</span> <span class="tlaGNC">           2 :         basic_string(_InputIterator __beg, _InputIterator __end,</span></span>
<span id="L761"><span class="lineNum">     761</span>              :                      const _Alloc&amp; __a = _Alloc())</span>
<span id="L762"><span class="lineNum">     762</span> <span class="tlaGNC">           2 :         : _M_dataplus(_M_local_data(), __a), _M_string_length(0)</span></span>
<span id="L763"><span class="lineNum">     763</span>              :         {</span>
<span id="L764"><span class="lineNum">     764</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L765"><span class="lineNum">     765</span> <span class="tlaGNC">           2 :           _M_construct(__beg, __end, std::__iterator_category(__beg));</span></span>
<span id="L766"><span class="lineNum">     766</span>              : #else</span>
<span id="L767"><span class="lineNum">     767</span>              :           typedef typename std::__is_integer&lt;_InputIterator&gt;::__type _Integral;</span>
<span id="L768"><span class="lineNum">     768</span>              :           _M_construct_aux(__beg, __end, _Integral());</span>
<span id="L769"><span class="lineNum">     769</span>              : #endif</span>
<span id="L770"><span class="lineNum">     770</span> <span class="tlaGNC">           2 :         }</span></span>
<span id="L771"><span class="lineNum">     771</span>              : </span>
<span id="L772"><span class="lineNum">     772</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L773"><span class="lineNum">     773</span>              :       /**</span>
<span id="L774"><span class="lineNum">     774</span>              :        *  @brief  Construct string from a substring of a string_view.</span>
<span id="L775"><span class="lineNum">     775</span>              :        *  @param  __t   Source object convertible to string view.</span>
<span id="L776"><span class="lineNum">     776</span>              :        *  @param  __pos The index of the first character to copy from __t.</span>
<span id="L777"><span class="lineNum">     777</span>              :        *  @param  __n   The number of characters to copy from __t.</span>
<span id="L778"><span class="lineNum">     778</span>              :        *  @param  __a   Allocator to use.</span>
<span id="L779"><span class="lineNum">     779</span>              :        */</span>
<span id="L780"><span class="lineNum">     780</span>              :       template&lt;typename _Tp,</span>
<span id="L781"><span class="lineNum">     781</span>              :                typename = enable_if_t&lt;is_convertible_v&lt;const _Tp&amp;, __sv_type&gt;&gt;&gt;</span>
<span id="L782"><span class="lineNum">     782</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L783"><span class="lineNum">     783</span>              :         basic_string(const _Tp&amp; __t, size_type __pos, size_type __n,</span>
<span id="L784"><span class="lineNum">     784</span>              :                      const _Alloc&amp; __a = _Alloc())</span>
<span id="L785"><span class="lineNum">     785</span>              :         : basic_string(_S_to_string_view(__t).substr(__pos, __n), __a) { }</span>
<span id="L786"><span class="lineNum">     786</span>              : </span>
<span id="L787"><span class="lineNum">     787</span>              :       /**</span>
<span id="L788"><span class="lineNum">     788</span>              :        *  @brief  Construct string from a string_view.</span>
<span id="L789"><span class="lineNum">     789</span>              :        *  @param  __t  Source object convertible to string view.</span>
<span id="L790"><span class="lineNum">     790</span>              :        *  @param  __a  Allocator to use (default is default allocator).</span>
<span id="L791"><span class="lineNum">     791</span>              :        */</span>
<span id="L792"><span class="lineNum">     792</span>              :       template&lt;typename _Tp, typename = _If_sv&lt;_Tp, void&gt;&gt;</span>
<span id="L793"><span class="lineNum">     793</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L794"><span class="lineNum">     794</span>              :         explicit</span>
<span id="L795"><span class="lineNum">     795</span>              :         basic_string(const _Tp&amp; __t, const _Alloc&amp; __a = _Alloc())</span>
<span id="L796"><span class="lineNum">     796</span>              :         : basic_string(__sv_wrapper(_S_to_string_view(__t)), __a) { }</span>
<span id="L797"><span class="lineNum">     797</span>              : #endif // C++17</span>
<span id="L798"><span class="lineNum">     798</span>              : </span>
<span id="L799"><span class="lineNum">     799</span>              :       /**</span>
<span id="L800"><span class="lineNum">     800</span>              :        *  @brief  Destroy the string instance.</span>
<span id="L801"><span class="lineNum">     801</span>              :        */</span>
<span id="L802"><span class="lineNum">     802</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L803"><span class="lineNum">     803</span>              :       ~basic_string()</span>
<span id="L804"><span class="lineNum">     804</span>              :       { _M_dispose(); }</span>
<span id="L805"><span class="lineNum">     805</span>              : </span>
<span id="L806"><span class="lineNum">     806</span>              :       /**</span>
<span id="L807"><span class="lineNum">     807</span>              :        *  @brief  Assign the value of @a str to this string.</span>
<span id="L808"><span class="lineNum">     808</span>              :        *  @param  __str  Source string.</span>
<span id="L809"><span class="lineNum">     809</span>              :        */</span>
<span id="L810"><span class="lineNum">     810</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L811"><span class="lineNum">     811</span>              :       basic_string&amp;</span>
<span id="L812"><span class="lineNum">     812</span>              :       operator=(const basic_string&amp; __str)</span>
<span id="L813"><span class="lineNum">     813</span>              :       {</span>
<span id="L814"><span class="lineNum">     814</span>              :         return this-&gt;assign(__str);</span>
<span id="L815"><span class="lineNum">     815</span>              :       }</span>
<span id="L816"><span class="lineNum">     816</span>              : </span>
<span id="L817"><span class="lineNum">     817</span>              :       /**</span>
<span id="L818"><span class="lineNum">     818</span>              :        *  @brief  Copy contents of @a s into this string.</span>
<span id="L819"><span class="lineNum">     819</span>              :        *  @param  __s  Source null-terminated string.</span>
<span id="L820"><span class="lineNum">     820</span>              :        */</span>
<span id="L821"><span class="lineNum">     821</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L822"><span class="lineNum">     822</span>              :       basic_string&amp;</span>
<span id="L823"><span class="lineNum">     823</span>              :       operator=(const _CharT* __s)</span>
<span id="L824"><span class="lineNum">     824</span>              :       { return this-&gt;assign(__s); }</span>
<span id="L825"><span class="lineNum">     825</span>              : </span>
<span id="L826"><span class="lineNum">     826</span>              :       /**</span>
<span id="L827"><span class="lineNum">     827</span>              :        *  @brief  Set value to string of length 1.</span>
<span id="L828"><span class="lineNum">     828</span>              :        *  @param  __c  Source character.</span>
<span id="L829"><span class="lineNum">     829</span>              :        *</span>
<span id="L830"><span class="lineNum">     830</span>              :        *  Assigning to a character makes this string length 1 and</span>
<span id="L831"><span class="lineNum">     831</span>              :        *  (*this)[0] == @a c.</span>
<span id="L832"><span class="lineNum">     832</span>              :        */</span>
<span id="L833"><span class="lineNum">     833</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L834"><span class="lineNum">     834</span>              :       basic_string&amp;</span>
<span id="L835"><span class="lineNum">     835</span>              :       operator=(_CharT __c)</span>
<span id="L836"><span class="lineNum">     836</span>              :       {</span>
<span id="L837"><span class="lineNum">     837</span>              :         this-&gt;assign(1, __c);</span>
<span id="L838"><span class="lineNum">     838</span>              :         return *this;</span>
<span id="L839"><span class="lineNum">     839</span>              :       }</span>
<span id="L840"><span class="lineNum">     840</span>              : </span>
<span id="L841"><span class="lineNum">     841</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L842"><span class="lineNum">     842</span>              :       /**</span>
<span id="L843"><span class="lineNum">     843</span>              :        *  @brief  Move assign the value of @a str to this string.</span>
<span id="L844"><span class="lineNum">     844</span>              :        *  @param  __str  Source string.</span>
<span id="L845"><span class="lineNum">     845</span>              :        *</span>
<span id="L846"><span class="lineNum">     846</span>              :        *  The contents of @a str are moved into this string (without copying).</span>
<span id="L847"><span class="lineNum">     847</span>              :        *  @a str is a valid, but unspecified string.</span>
<span id="L848"><span class="lineNum">     848</span>              :        */</span>
<span id="L849"><span class="lineNum">     849</span>              :       // _GLIBCXX_RESOLVE_LIB_DEFECTS</span>
<span id="L850"><span class="lineNum">     850</span>              :       // 2063. Contradictory requirements for string move assignment</span>
<span id="L851"><span class="lineNum">     851</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L852"><span class="lineNum">     852</span>              :       basic_string&amp;</span>
<span id="L853"><span class="lineNum">     853</span>              :       operator=(basic_string&amp;&amp; __str)</span>
<span id="L854"><span class="lineNum">     854</span>              :       noexcept(_Alloc_traits::_S_nothrow_move())</span>
<span id="L855"><span class="lineNum">     855</span>              :       {</span>
<span id="L856"><span class="lineNum">     856</span>              :         const bool __equal_allocs = _Alloc_traits::_S_always_equal()</span>
<span id="L857"><span class="lineNum">     857</span>              :           || _M_get_allocator() == __str._M_get_allocator();</span>
<span id="L858"><span class="lineNum">     858</span>              :         if (!_M_is_local() &amp;&amp; _Alloc_traits::_S_propagate_on_move_assign()</span>
<span id="L859"><span class="lineNum">     859</span>              :             &amp;&amp; !__equal_allocs)</span>
<span id="L860"><span class="lineNum">     860</span>              :           {</span>
<span id="L861"><span class="lineNum">     861</span>              :             // Destroy existing storage before replacing allocator.</span>
<span id="L862"><span class="lineNum">     862</span>              :             _M_destroy(_M_allocated_capacity);</span>
<span id="L863"><span class="lineNum">     863</span>              :             _M_data(_M_local_data());</span>
<span id="L864"><span class="lineNum">     864</span>              :             _M_set_length(0);</span>
<span id="L865"><span class="lineNum">     865</span>              :           }</span>
<span id="L866"><span class="lineNum">     866</span>              :         // Replace allocator if POCMA is true.</span>
<span id="L867"><span class="lineNum">     867</span>              :         std::__alloc_on_move(_M_get_allocator(), __str._M_get_allocator());</span>
<span id="L868"><span class="lineNum">     868</span>              : </span>
<span id="L869"><span class="lineNum">     869</span>              :         if (__str._M_is_local())</span>
<span id="L870"><span class="lineNum">     870</span>              :           {</span>
<span id="L871"><span class="lineNum">     871</span>              :             // We've always got room for a short string, just copy it</span>
<span id="L872"><span class="lineNum">     872</span>              :             // (unless this is a self-move, because that would violate the</span>
<span id="L873"><span class="lineNum">     873</span>              :             // char_traits::copy precondition that the ranges don't overlap).</span>
<span id="L874"><span class="lineNum">     874</span>              :             if (__builtin_expect(std::__addressof(__str) != this, true))</span>
<span id="L875"><span class="lineNum">     875</span>              :               {</span>
<span id="L876"><span class="lineNum">     876</span>              :                 if (__str.size())</span>
<span id="L877"><span class="lineNum">     877</span>              :                   this-&gt;_S_copy(_M_data(), __str._M_data(), __str.size());</span>
<span id="L878"><span class="lineNum">     878</span>              :                 _M_set_length(__str.size());</span>
<span id="L879"><span class="lineNum">     879</span>              :               }</span>
<span id="L880"><span class="lineNum">     880</span>              :           }</span>
<span id="L881"><span class="lineNum">     881</span>              :         else if (_Alloc_traits::_S_propagate_on_move_assign() || __equal_allocs)</span>
<span id="L882"><span class="lineNum">     882</span>              :           {</span>
<span id="L883"><span class="lineNum">     883</span>              :             // Just move the allocated pointer, our allocator can free it.</span>
<span id="L884"><span class="lineNum">     884</span>              :             pointer __data = nullptr;</span>
<span id="L885"><span class="lineNum">     885</span>              :             size_type __capacity;</span>
<span id="L886"><span class="lineNum">     886</span>              :             if (!_M_is_local())</span>
<span id="L887"><span class="lineNum">     887</span>              :               {</span>
<span id="L888"><span class="lineNum">     888</span>              :                 if (__equal_allocs)</span>
<span id="L889"><span class="lineNum">     889</span>              :                   {</span>
<span id="L890"><span class="lineNum">     890</span>              :                     // __str can reuse our existing storage.</span>
<span id="L891"><span class="lineNum">     891</span>              :                     __data = _M_data();</span>
<span id="L892"><span class="lineNum">     892</span>              :                     __capacity = _M_allocated_capacity;</span>
<span id="L893"><span class="lineNum">     893</span>              :                   }</span>
<span id="L894"><span class="lineNum">     894</span>              :                 else // __str can't use it, so free it.</span>
<span id="L895"><span class="lineNum">     895</span>              :                   _M_destroy(_M_allocated_capacity);</span>
<span id="L896"><span class="lineNum">     896</span>              :               }</span>
<span id="L897"><span class="lineNum">     897</span>              : </span>
<span id="L898"><span class="lineNum">     898</span>              :             _M_data(__str._M_data());</span>
<span id="L899"><span class="lineNum">     899</span>              :             _M_length(__str.length());</span>
<span id="L900"><span class="lineNum">     900</span>              :             _M_capacity(__str._M_allocated_capacity);</span>
<span id="L901"><span class="lineNum">     901</span>              :             if (__data)</span>
<span id="L902"><span class="lineNum">     902</span>              :               {</span>
<span id="L903"><span class="lineNum">     903</span>              :                 __str._M_data(__data);</span>
<span id="L904"><span class="lineNum">     904</span>              :                 __str._M_capacity(__capacity);</span>
<span id="L905"><span class="lineNum">     905</span>              :               }</span>
<span id="L906"><span class="lineNum">     906</span>              :             else</span>
<span id="L907"><span class="lineNum">     907</span>              :               __str._M_data(__str._M_use_local_data());</span>
<span id="L908"><span class="lineNum">     908</span>              :           }</span>
<span id="L909"><span class="lineNum">     909</span>              :         else // Need to do a deep copy</span>
<span id="L910"><span class="lineNum">     910</span>              :           assign(__str);</span>
<span id="L911"><span class="lineNum">     911</span>              :         __str.clear();</span>
<span id="L912"><span class="lineNum">     912</span>              :         return *this;</span>
<span id="L913"><span class="lineNum">     913</span>              :       }</span>
<span id="L914"><span class="lineNum">     914</span>              : </span>
<span id="L915"><span class="lineNum">     915</span>              :       /**</span>
<span id="L916"><span class="lineNum">     916</span>              :        *  @brief  Set value to string constructed from initializer %list.</span>
<span id="L917"><span class="lineNum">     917</span>              :        *  @param  __l  std::initializer_list.</span>
<span id="L918"><span class="lineNum">     918</span>              :        */</span>
<span id="L919"><span class="lineNum">     919</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L920"><span class="lineNum">     920</span>              :       basic_string&amp;</span>
<span id="L921"><span class="lineNum">     921</span>              :       operator=(initializer_list&lt;_CharT&gt; __l)</span>
<span id="L922"><span class="lineNum">     922</span>              :       {</span>
<span id="L923"><span class="lineNum">     923</span>              :         this-&gt;assign(__l.begin(), __l.size());</span>
<span id="L924"><span class="lineNum">     924</span>              :         return *this;</span>
<span id="L925"><span class="lineNum">     925</span>              :       }</span>
<span id="L926"><span class="lineNum">     926</span>              : #endif // C++11</span>
<span id="L927"><span class="lineNum">     927</span>              : </span>
<span id="L928"><span class="lineNum">     928</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L929"><span class="lineNum">     929</span>              :       /**</span>
<span id="L930"><span class="lineNum">     930</span>              :        *  @brief  Set value to string constructed from a string_view.</span>
<span id="L931"><span class="lineNum">     931</span>              :        *  @param  __svt  An object convertible to string_view.</span>
<span id="L932"><span class="lineNum">     932</span>              :        */</span>
<span id="L933"><span class="lineNum">     933</span>              :      template&lt;typename _Tp&gt;</span>
<span id="L934"><span class="lineNum">     934</span>              :        _GLIBCXX20_CONSTEXPR</span>
<span id="L935"><span class="lineNum">     935</span>              :        _If_sv&lt;_Tp, basic_string&amp;&gt;</span>
<span id="L936"><span class="lineNum">     936</span>              :        operator=(const _Tp&amp; __svt)</span>
<span id="L937"><span class="lineNum">     937</span>              :        { return this-&gt;assign(__svt); }</span>
<span id="L938"><span class="lineNum">     938</span>              : </span>
<span id="L939"><span class="lineNum">     939</span>              :       /**</span>
<span id="L940"><span class="lineNum">     940</span>              :        *  @brief  Convert to a string_view.</span>
<span id="L941"><span class="lineNum">     941</span>              :        *  @return A string_view.</span>
<span id="L942"><span class="lineNum">     942</span>              :        */</span>
<span id="L943"><span class="lineNum">     943</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L944"><span class="lineNum">     944</span>              :       operator __sv_type() const noexcept</span>
<span id="L945"><span class="lineNum">     945</span>              :       { return __sv_type(data(), size()); }</span>
<span id="L946"><span class="lineNum">     946</span>              : #endif // C++17</span>
<span id="L947"><span class="lineNum">     947</span>              : </span>
<span id="L948"><span class="lineNum">     948</span>              :       // Iterators:</span>
<span id="L949"><span class="lineNum">     949</span>              :       /**</span>
<span id="L950"><span class="lineNum">     950</span>              :        *  Returns a read/write iterator that points to the first character in</span>
<span id="L951"><span class="lineNum">     951</span>              :        *  the %string.</span>
<span id="L952"><span class="lineNum">     952</span>              :        */</span>
<span id="L953"><span class="lineNum">     953</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L954"><span class="lineNum">     954</span>              :       iterator</span>
<span id="L955"><span class="lineNum">     955</span>              :       begin() _GLIBCXX_NOEXCEPT</span>
<span id="L956"><span class="lineNum">     956</span>              :       { return iterator(_M_data()); }</span>
<span id="L957"><span class="lineNum">     957</span>              : </span>
<span id="L958"><span class="lineNum">     958</span>              :       /**</span>
<span id="L959"><span class="lineNum">     959</span>              :        *  Returns a read-only (constant) iterator that points to the first</span>
<span id="L960"><span class="lineNum">     960</span>              :        *  character in the %string.</span>
<span id="L961"><span class="lineNum">     961</span>              :        */</span>
<span id="L962"><span class="lineNum">     962</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L963"><span class="lineNum">     963</span>              :       const_iterator</span>
<span id="L964"><span class="lineNum">     964</span>              :       begin() const _GLIBCXX_NOEXCEPT</span>
<span id="L965"><span class="lineNum">     965</span>              :       { return const_iterator(_M_data()); }</span>
<span id="L966"><span class="lineNum">     966</span>              : </span>
<span id="L967"><span class="lineNum">     967</span>              :       /**</span>
<span id="L968"><span class="lineNum">     968</span>              :        *  Returns a read/write iterator that points one past the last</span>
<span id="L969"><span class="lineNum">     969</span>              :        *  character in the %string.</span>
<span id="L970"><span class="lineNum">     970</span>              :        */</span>
<span id="L971"><span class="lineNum">     971</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L972"><span class="lineNum">     972</span>              :       iterator</span>
<span id="L973"><span class="lineNum">     973</span>              :       end() _GLIBCXX_NOEXCEPT</span>
<span id="L974"><span class="lineNum">     974</span>              :       { return iterator(_M_data() + this-&gt;size()); }</span>
<span id="L975"><span class="lineNum">     975</span>              : </span>
<span id="L976"><span class="lineNum">     976</span>              :       /**</span>
<span id="L977"><span class="lineNum">     977</span>              :        *  Returns a read-only (constant) iterator that points one past the</span>
<span id="L978"><span class="lineNum">     978</span>              :        *  last character in the %string.</span>
<span id="L979"><span class="lineNum">     979</span>              :        */</span>
<span id="L980"><span class="lineNum">     980</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L981"><span class="lineNum">     981</span>              :       const_iterator</span>
<span id="L982"><span class="lineNum">     982</span>              :       end() const _GLIBCXX_NOEXCEPT</span>
<span id="L983"><span class="lineNum">     983</span>              :       { return const_iterator(_M_data() + this-&gt;size()); }</span>
<span id="L984"><span class="lineNum">     984</span>              : </span>
<span id="L985"><span class="lineNum">     985</span>              :       /**</span>
<span id="L986"><span class="lineNum">     986</span>              :        *  Returns a read/write reverse iterator that points to the last</span>
<span id="L987"><span class="lineNum">     987</span>              :        *  character in the %string.  Iteration is done in reverse element</span>
<span id="L988"><span class="lineNum">     988</span>              :        *  order.</span>
<span id="L989"><span class="lineNum">     989</span>              :        */</span>
<span id="L990"><span class="lineNum">     990</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L991"><span class="lineNum">     991</span>              :       reverse_iterator</span>
<span id="L992"><span class="lineNum">     992</span>              :       rbegin() _GLIBCXX_NOEXCEPT</span>
<span id="L993"><span class="lineNum">     993</span>              :       { return reverse_iterator(this-&gt;end()); }</span>
<span id="L994"><span class="lineNum">     994</span>              : </span>
<span id="L995"><span class="lineNum">     995</span>              :       /**</span>
<span id="L996"><span class="lineNum">     996</span>              :        *  Returns a read-only (constant) reverse iterator that points</span>
<span id="L997"><span class="lineNum">     997</span>              :        *  to the last character in the %string.  Iteration is done in</span>
<span id="L998"><span class="lineNum">     998</span>              :        *  reverse element order.</span>
<span id="L999"><span class="lineNum">     999</span>              :        */</span>
<span id="L1000"><span class="lineNum">    1000</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1001"><span class="lineNum">    1001</span>              :       const_reverse_iterator</span>
<span id="L1002"><span class="lineNum">    1002</span>              :       rbegin() const _GLIBCXX_NOEXCEPT</span>
<span id="L1003"><span class="lineNum">    1003</span>              :       { return const_reverse_iterator(this-&gt;end()); }</span>
<span id="L1004"><span class="lineNum">    1004</span>              : </span>
<span id="L1005"><span class="lineNum">    1005</span>              :       /**</span>
<span id="L1006"><span class="lineNum">    1006</span>              :        *  Returns a read/write reverse iterator that points to one before the</span>
<span id="L1007"><span class="lineNum">    1007</span>              :        *  first character in the %string.  Iteration is done in reverse</span>
<span id="L1008"><span class="lineNum">    1008</span>              :        *  element order.</span>
<span id="L1009"><span class="lineNum">    1009</span>              :        */</span>
<span id="L1010"><span class="lineNum">    1010</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1011"><span class="lineNum">    1011</span>              :       reverse_iterator</span>
<span id="L1012"><span class="lineNum">    1012</span>              :       rend() _GLIBCXX_NOEXCEPT</span>
<span id="L1013"><span class="lineNum">    1013</span>              :       { return reverse_iterator(this-&gt;begin()); }</span>
<span id="L1014"><span class="lineNum">    1014</span>              : </span>
<span id="L1015"><span class="lineNum">    1015</span>              :       /**</span>
<span id="L1016"><span class="lineNum">    1016</span>              :        *  Returns a read-only (constant) reverse iterator that points</span>
<span id="L1017"><span class="lineNum">    1017</span>              :        *  to one before the first character in the %string.  Iteration</span>
<span id="L1018"><span class="lineNum">    1018</span>              :        *  is done in reverse element order.</span>
<span id="L1019"><span class="lineNum">    1019</span>              :        */</span>
<span id="L1020"><span class="lineNum">    1020</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1021"><span class="lineNum">    1021</span>              :       const_reverse_iterator</span>
<span id="L1022"><span class="lineNum">    1022</span>              :       rend() const _GLIBCXX_NOEXCEPT</span>
<span id="L1023"><span class="lineNum">    1023</span>              :       { return const_reverse_iterator(this-&gt;begin()); }</span>
<span id="L1024"><span class="lineNum">    1024</span>              : </span>
<span id="L1025"><span class="lineNum">    1025</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L1026"><span class="lineNum">    1026</span>              :       /**</span>
<span id="L1027"><span class="lineNum">    1027</span>              :        *  Returns a read-only (constant) iterator that points to the first</span>
<span id="L1028"><span class="lineNum">    1028</span>              :        *  character in the %string.</span>
<span id="L1029"><span class="lineNum">    1029</span>              :        */</span>
<span id="L1030"><span class="lineNum">    1030</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1031"><span class="lineNum">    1031</span>              :       const_iterator</span>
<span id="L1032"><span class="lineNum">    1032</span>              :       cbegin() const noexcept</span>
<span id="L1033"><span class="lineNum">    1033</span>              :       { return const_iterator(this-&gt;_M_data()); }</span>
<span id="L1034"><span class="lineNum">    1034</span>              : </span>
<span id="L1035"><span class="lineNum">    1035</span>              :       /**</span>
<span id="L1036"><span class="lineNum">    1036</span>              :        *  Returns a read-only (constant) iterator that points one past the</span>
<span id="L1037"><span class="lineNum">    1037</span>              :        *  last character in the %string.</span>
<span id="L1038"><span class="lineNum">    1038</span>              :        */</span>
<span id="L1039"><span class="lineNum">    1039</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1040"><span class="lineNum">    1040</span>              :       const_iterator</span>
<span id="L1041"><span class="lineNum">    1041</span>              :       cend() const noexcept</span>
<span id="L1042"><span class="lineNum">    1042</span>              :       { return const_iterator(this-&gt;_M_data() + this-&gt;size()); }</span>
<span id="L1043"><span class="lineNum">    1043</span>              : </span>
<span id="L1044"><span class="lineNum">    1044</span>              :       /**</span>
<span id="L1045"><span class="lineNum">    1045</span>              :        *  Returns a read-only (constant) reverse iterator that points</span>
<span id="L1046"><span class="lineNum">    1046</span>              :        *  to the last character in the %string.  Iteration is done in</span>
<span id="L1047"><span class="lineNum">    1047</span>              :        *  reverse element order.</span>
<span id="L1048"><span class="lineNum">    1048</span>              :        */</span>
<span id="L1049"><span class="lineNum">    1049</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1050"><span class="lineNum">    1050</span>              :       const_reverse_iterator</span>
<span id="L1051"><span class="lineNum">    1051</span>              :       crbegin() const noexcept</span>
<span id="L1052"><span class="lineNum">    1052</span>              :       { return const_reverse_iterator(this-&gt;end()); }</span>
<span id="L1053"><span class="lineNum">    1053</span>              : </span>
<span id="L1054"><span class="lineNum">    1054</span>              :       /**</span>
<span id="L1055"><span class="lineNum">    1055</span>              :        *  Returns a read-only (constant) reverse iterator that points</span>
<span id="L1056"><span class="lineNum">    1056</span>              :        *  to one before the first character in the %string.  Iteration</span>
<span id="L1057"><span class="lineNum">    1057</span>              :        *  is done in reverse element order.</span>
<span id="L1058"><span class="lineNum">    1058</span>              :        */</span>
<span id="L1059"><span class="lineNum">    1059</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1060"><span class="lineNum">    1060</span>              :       const_reverse_iterator</span>
<span id="L1061"><span class="lineNum">    1061</span>              :       crend() const noexcept</span>
<span id="L1062"><span class="lineNum">    1062</span>              :       { return const_reverse_iterator(this-&gt;begin()); }</span>
<span id="L1063"><span class="lineNum">    1063</span>              : #endif</span>
<span id="L1064"><span class="lineNum">    1064</span>              : </span>
<span id="L1065"><span class="lineNum">    1065</span>              :     public:</span>
<span id="L1066"><span class="lineNum">    1066</span>              :       // Capacity:</span>
<span id="L1067"><span class="lineNum">    1067</span>              :       ///  Returns the number of characters in the string, not including any</span>
<span id="L1068"><span class="lineNum">    1068</span>              :       ///  null-termination.</span>
<span id="L1069"><span class="lineNum">    1069</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1070"><span class="lineNum">    1070</span>              :       size_type</span>
<span id="L1071"><span class="lineNum">    1071</span>              :       size() const _GLIBCXX_NOEXCEPT</span>
<span id="L1072"><span class="lineNum">    1072</span>              :       { return _M_string_length; }</span>
<span id="L1073"><span class="lineNum">    1073</span>              : </span>
<span id="L1074"><span class="lineNum">    1074</span>              :       ///  Returns the number of characters in the string, not including any</span>
<span id="L1075"><span class="lineNum">    1075</span>              :       ///  null-termination.</span>
<span id="L1076"><span class="lineNum">    1076</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1077"><span class="lineNum">    1077</span>              :       size_type</span>
<span id="L1078"><span class="lineNum">    1078</span>              :       length() const _GLIBCXX_NOEXCEPT</span>
<span id="L1079"><span class="lineNum">    1079</span>              :       { return _M_string_length; }</span>
<span id="L1080"><span class="lineNum">    1080</span>              : </span>
<span id="L1081"><span class="lineNum">    1081</span>              :       ///  Returns the size() of the largest possible %string.</span>
<span id="L1082"><span class="lineNum">    1082</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1083"><span class="lineNum">    1083</span>              :       size_type</span>
<span id="L1084"><span class="lineNum">    1084</span>              :       max_size() const _GLIBCXX_NOEXCEPT</span>
<span id="L1085"><span class="lineNum">    1085</span>              :       { return (_Alloc_traits::max_size(_M_get_allocator()) - 1) / 2; }</span>
<span id="L1086"><span class="lineNum">    1086</span>              : </span>
<span id="L1087"><span class="lineNum">    1087</span>              :       /**</span>
<span id="L1088"><span class="lineNum">    1088</span>              :        *  @brief  Resizes the %string to the specified number of characters.</span>
<span id="L1089"><span class="lineNum">    1089</span>              :        *  @param  __n  Number of characters the %string should contain.</span>
<span id="L1090"><span class="lineNum">    1090</span>              :        *  @param  __c  Character to fill any new elements.</span>
<span id="L1091"><span class="lineNum">    1091</span>              :        *</span>
<span id="L1092"><span class="lineNum">    1092</span>              :        *  This function will %resize the %string to the specified</span>
<span id="L1093"><span class="lineNum">    1093</span>              :        *  number of characters.  If the number is smaller than the</span>
<span id="L1094"><span class="lineNum">    1094</span>              :        *  %string's current size the %string is truncated, otherwise</span>
<span id="L1095"><span class="lineNum">    1095</span>              :        *  the %string is extended and new elements are %set to @a __c.</span>
<span id="L1096"><span class="lineNum">    1096</span>              :        */</span>
<span id="L1097"><span class="lineNum">    1097</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1098"><span class="lineNum">    1098</span>              :       void</span>
<span id="L1099"><span class="lineNum">    1099</span>              :       resize(size_type __n, _CharT __c);</span>
<span id="L1100"><span class="lineNum">    1100</span>              : </span>
<span id="L1101"><span class="lineNum">    1101</span>              :       /**</span>
<span id="L1102"><span class="lineNum">    1102</span>              :        *  @brief  Resizes the %string to the specified number of characters.</span>
<span id="L1103"><span class="lineNum">    1103</span>              :        *  @param  __n  Number of characters the %string should contain.</span>
<span id="L1104"><span class="lineNum">    1104</span>              :        *</span>
<span id="L1105"><span class="lineNum">    1105</span>              :        *  This function will resize the %string to the specified length.  If</span>
<span id="L1106"><span class="lineNum">    1106</span>              :        *  the new size is smaller than the %string's current size the %string</span>
<span id="L1107"><span class="lineNum">    1107</span>              :        *  is truncated, otherwise the %string is extended and new characters</span>
<span id="L1108"><span class="lineNum">    1108</span>              :        *  are default-constructed.  For basic types such as char, this means</span>
<span id="L1109"><span class="lineNum">    1109</span>              :        *  setting them to 0.</span>
<span id="L1110"><span class="lineNum">    1110</span>              :        */</span>
<span id="L1111"><span class="lineNum">    1111</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1112"><span class="lineNum">    1112</span>              :       void</span>
<span id="L1113"><span class="lineNum">    1113</span>              :       resize(size_type __n)</span>
<span id="L1114"><span class="lineNum">    1114</span>              :       { this-&gt;resize(__n, _CharT()); }</span>
<span id="L1115"><span class="lineNum">    1115</span>              : </span>
<span id="L1116"><span class="lineNum">    1116</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L1117"><span class="lineNum">    1117</span>              : #pragma GCC diagnostic push</span>
<span id="L1118"><span class="lineNum">    1118</span>              : #pragma GCC diagnostic ignored &quot;-Wdeprecated-declarations&quot;</span>
<span id="L1119"><span class="lineNum">    1119</span>              :       ///  A non-binding request to reduce capacity() to size().</span>
<span id="L1120"><span class="lineNum">    1120</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1121"><span class="lineNum">    1121</span>              :       void</span>
<span id="L1122"><span class="lineNum">    1122</span>              :       shrink_to_fit() noexcept</span>
<span id="L1123"><span class="lineNum">    1123</span>              :       { reserve(); }</span>
<span id="L1124"><span class="lineNum">    1124</span>              : #pragma GCC diagnostic pop</span>
<span id="L1125"><span class="lineNum">    1125</span>              : #endif</span>
<span id="L1126"><span class="lineNum">    1126</span>              : </span>
<span id="L1127"><span class="lineNum">    1127</span>              : #if __cplusplus &gt; 202002L</span>
<span id="L1128"><span class="lineNum">    1128</span>              : #define __cpp_lib_string_resize_and_overwrite 202110L</span>
<span id="L1129"><span class="lineNum">    1129</span>              :       /** Resize the string and call a function to fill it.</span>
<span id="L1130"><span class="lineNum">    1130</span>              :        *</span>
<span id="L1131"><span class="lineNum">    1131</span>              :        * @param __n   The maximum size requested.</span>
<span id="L1132"><span class="lineNum">    1132</span>              :        * @param __op  A callable object that writes characters to the string.</span>
<span id="L1133"><span class="lineNum">    1133</span>              :        *</span>
<span id="L1134"><span class="lineNum">    1134</span>              :        * This is a low-level function that is easy to misuse, be careful.</span>
<span id="L1135"><span class="lineNum">    1135</span>              :        *</span>
<span id="L1136"><span class="lineNum">    1136</span>              :        * Calling `str.resize_and_overwrite(n, op)` will reserve at least `n`</span>
<span id="L1137"><span class="lineNum">    1137</span>              :        * characters in `str`, evaluate `n2 = std::move(op)(str.data(), n)`,</span>
<span id="L1138"><span class="lineNum">    1138</span>              :        * and finally set the string length to `n2` (adding a null terminator</span>
<span id="L1139"><span class="lineNum">    1139</span>              :        * at the end). The function object `op` is allowed to write to the</span>
<span id="L1140"><span class="lineNum">    1140</span>              :        * extra capacity added by the initial reserve operation, which is not</span>
<span id="L1141"><span class="lineNum">    1141</span>              :        * allowed if you just call `str.reserve(n)` yourself.</span>
<span id="L1142"><span class="lineNum">    1142</span>              :        *</span>
<span id="L1143"><span class="lineNum">    1143</span>              :        * This can be used to efficiently fill a `string` buffer without the</span>
<span id="L1144"><span class="lineNum">    1144</span>              :        * overhead of zero-initializing characters that will be overwritten</span>
<span id="L1145"><span class="lineNum">    1145</span>              :        * anyway.</span>
<span id="L1146"><span class="lineNum">    1146</span>              :        *</span>
<span id="L1147"><span class="lineNum">    1147</span>              :        * The callable `op` must not access the string directly (only through</span>
<span id="L1148"><span class="lineNum">    1148</span>              :        * the pointer passed as its first argument), must not write more than</span>
<span id="L1149"><span class="lineNum">    1149</span>              :        * `n` characters to the string, must return a value no greater than `n`,</span>
<span id="L1150"><span class="lineNum">    1150</span>              :        * and must ensure that all characters up to the returned length are</span>
<span id="L1151"><span class="lineNum">    1151</span>              :        * valid after it returns (i.e. there must be no uninitialized values</span>
<span id="L1152"><span class="lineNum">    1152</span>              :        * left in the string after the call, because accessing them would</span>
<span id="L1153"><span class="lineNum">    1153</span>              :        * have undefined behaviour). If `op` exits by throwing an exception</span>
<span id="L1154"><span class="lineNum">    1154</span>              :        * the behaviour is undefined.</span>
<span id="L1155"><span class="lineNum">    1155</span>              :        *</span>
<span id="L1156"><span class="lineNum">    1156</span>              :        * @since C++23</span>
<span id="L1157"><span class="lineNum">    1157</span>              :        */</span>
<span id="L1158"><span class="lineNum">    1158</span>              :       template&lt;typename _Operation&gt;</span>
<span id="L1159"><span class="lineNum">    1159</span>              :         constexpr void</span>
<span id="L1160"><span class="lineNum">    1160</span>              :         resize_and_overwrite(size_type __n, _Operation __op);</span>
<span id="L1161"><span class="lineNum">    1161</span>              : #endif</span>
<span id="L1162"><span class="lineNum">    1162</span>              : </span>
<span id="L1163"><span class="lineNum">    1163</span>              :       /**</span>
<span id="L1164"><span class="lineNum">    1164</span>              :        *  Returns the total number of characters that the %string can hold</span>
<span id="L1165"><span class="lineNum">    1165</span>              :        *  before needing to allocate more memory.</span>
<span id="L1166"><span class="lineNum">    1166</span>              :        */</span>
<span id="L1167"><span class="lineNum">    1167</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1168"><span class="lineNum">    1168</span>              :       size_type</span>
<span id="L1169"><span class="lineNum">    1169</span>              :       capacity() const _GLIBCXX_NOEXCEPT</span>
<span id="L1170"><span class="lineNum">    1170</span>              :       {</span>
<span id="L1171"><span class="lineNum">    1171</span>              :         return _M_is_local() ? size_type(_S_local_capacity)</span>
<span id="L1172"><span class="lineNum">    1172</span>              :                              : _M_allocated_capacity;</span>
<span id="L1173"><span class="lineNum">    1173</span>              :       }</span>
<span id="L1174"><span class="lineNum">    1174</span>              : </span>
<span id="L1175"><span class="lineNum">    1175</span>              :       /**</span>
<span id="L1176"><span class="lineNum">    1176</span>              :        *  @brief  Attempt to preallocate enough memory for specified number of</span>
<span id="L1177"><span class="lineNum">    1177</span>              :        *          characters.</span>
<span id="L1178"><span class="lineNum">    1178</span>              :        *  @param  __res_arg  Number of characters required.</span>
<span id="L1179"><span class="lineNum">    1179</span>              :        *  @throw  std::length_error  If @a __res_arg exceeds @c max_size().</span>
<span id="L1180"><span class="lineNum">    1180</span>              :        *</span>
<span id="L1181"><span class="lineNum">    1181</span>              :        *  This function attempts to reserve enough memory for the</span>
<span id="L1182"><span class="lineNum">    1182</span>              :        *  %string to hold the specified number of characters.  If the</span>
<span id="L1183"><span class="lineNum">    1183</span>              :        *  number requested is more than max_size(), length_error is</span>
<span id="L1184"><span class="lineNum">    1184</span>              :        *  thrown.</span>
<span id="L1185"><span class="lineNum">    1185</span>              :        *</span>
<span id="L1186"><span class="lineNum">    1186</span>              :        *  The advantage of this function is that if optimal code is a</span>
<span id="L1187"><span class="lineNum">    1187</span>              :        *  necessity and the user can determine the string length that will be</span>
<span id="L1188"><span class="lineNum">    1188</span>              :        *  required, the user can reserve the memory in %advance, and thus</span>
<span id="L1189"><span class="lineNum">    1189</span>              :        *  prevent a possible reallocation of memory and copying of %string</span>
<span id="L1190"><span class="lineNum">    1190</span>              :        *  data.</span>
<span id="L1191"><span class="lineNum">    1191</span>              :        */</span>
<span id="L1192"><span class="lineNum">    1192</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1193"><span class="lineNum">    1193</span>              :       void</span>
<span id="L1194"><span class="lineNum">    1194</span>              :       reserve(size_type __res_arg);</span>
<span id="L1195"><span class="lineNum">    1195</span>              : </span>
<span id="L1196"><span class="lineNum">    1196</span>              :       /**</span>
<span id="L1197"><span class="lineNum">    1197</span>              :        *  Equivalent to shrink_to_fit().</span>
<span id="L1198"><span class="lineNum">    1198</span>              :        */</span>
<span id="L1199"><span class="lineNum">    1199</span>              : #if __cplusplus &gt; 201703L</span>
<span id="L1200"><span class="lineNum">    1200</span>              :       [[deprecated(&quot;use shrink_to_fit() instead&quot;)]]</span>
<span id="L1201"><span class="lineNum">    1201</span>              : #endif</span>
<span id="L1202"><span class="lineNum">    1202</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1203"><span class="lineNum">    1203</span>              :       void</span>
<span id="L1204"><span class="lineNum">    1204</span>              :       reserve();</span>
<span id="L1205"><span class="lineNum">    1205</span>              : </span>
<span id="L1206"><span class="lineNum">    1206</span>              :       /**</span>
<span id="L1207"><span class="lineNum">    1207</span>              :        *  Erases the string, making it empty.</span>
<span id="L1208"><span class="lineNum">    1208</span>              :        */</span>
<span id="L1209"><span class="lineNum">    1209</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1210"><span class="lineNum">    1210</span>              :       void</span>
<span id="L1211"><span class="lineNum">    1211</span>              :       clear() _GLIBCXX_NOEXCEPT</span>
<span id="L1212"><span class="lineNum">    1212</span>              :       { _M_set_length(0); }</span>
<span id="L1213"><span class="lineNum">    1213</span>              : </span>
<span id="L1214"><span class="lineNum">    1214</span>              :       /**</span>
<span id="L1215"><span class="lineNum">    1215</span>              :        *  Returns true if the %string is empty.  Equivalent to </span>
<span id="L1216"><span class="lineNum">    1216</span>              :        *  &lt;code&gt;*this == &quot;&quot;&lt;/code&gt;.</span>
<span id="L1217"><span class="lineNum">    1217</span>              :        */</span>
<span id="L1218"><span class="lineNum">    1218</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1219"><span class="lineNum">    1219</span>              :       bool</span>
<span id="L1220"><span class="lineNum">    1220</span>              :       empty() const _GLIBCXX_NOEXCEPT</span>
<span id="L1221"><span class="lineNum">    1221</span>              :       { return this-&gt;size() == 0; }</span>
<span id="L1222"><span class="lineNum">    1222</span>              : </span>
<span id="L1223"><span class="lineNum">    1223</span>              :       // Element access:</span>
<span id="L1224"><span class="lineNum">    1224</span>              :       /**</span>
<span id="L1225"><span class="lineNum">    1225</span>              :        *  @brief  Subscript access to the data contained in the %string.</span>
<span id="L1226"><span class="lineNum">    1226</span>              :        *  @param  __pos  The index of the character to access.</span>
<span id="L1227"><span class="lineNum">    1227</span>              :        *  @return  Read-only (constant) reference to the character.</span>
<span id="L1228"><span class="lineNum">    1228</span>              :        *</span>
<span id="L1229"><span class="lineNum">    1229</span>              :        *  This operator allows for easy, array-style, data access.</span>
<span id="L1230"><span class="lineNum">    1230</span>              :        *  Note that data access with this operator is unchecked and</span>
<span id="L1231"><span class="lineNum">    1231</span>              :        *  out_of_range lookups are not defined. (For checked lookups</span>
<span id="L1232"><span class="lineNum">    1232</span>              :        *  see at().)</span>
<span id="L1233"><span class="lineNum">    1233</span>              :        */</span>
<span id="L1234"><span class="lineNum">    1234</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1235"><span class="lineNum">    1235</span>              :       const_reference</span>
<span id="L1236"><span class="lineNum">    1236</span>              :       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT</span>
<span id="L1237"><span class="lineNum">    1237</span>              :       {</span>
<span id="L1238"><span class="lineNum">    1238</span>              :         __glibcxx_assert(__pos &lt;= size());</span>
<span id="L1239"><span class="lineNum">    1239</span>              :         return _M_data()[__pos];</span>
<span id="L1240"><span class="lineNum">    1240</span>              :       }</span>
<span id="L1241"><span class="lineNum">    1241</span>              : </span>
<span id="L1242"><span class="lineNum">    1242</span>              :       /**</span>
<span id="L1243"><span class="lineNum">    1243</span>              :        *  @brief  Subscript access to the data contained in the %string.</span>
<span id="L1244"><span class="lineNum">    1244</span>              :        *  @param  __pos  The index of the character to access.</span>
<span id="L1245"><span class="lineNum">    1245</span>              :        *  @return  Read/write reference to the character.</span>
<span id="L1246"><span class="lineNum">    1246</span>              :        *</span>
<span id="L1247"><span class="lineNum">    1247</span>              :        *  This operator allows for easy, array-style, data access.</span>
<span id="L1248"><span class="lineNum">    1248</span>              :        *  Note that data access with this operator is unchecked and</span>
<span id="L1249"><span class="lineNum">    1249</span>              :        *  out_of_range lookups are not defined. (For checked lookups</span>
<span id="L1250"><span class="lineNum">    1250</span>              :        *  see at().)</span>
<span id="L1251"><span class="lineNum">    1251</span>              :        */</span>
<span id="L1252"><span class="lineNum">    1252</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1253"><span class="lineNum">    1253</span>              :       reference</span>
<span id="L1254"><span class="lineNum">    1254</span>              :       operator[](size_type __pos)</span>
<span id="L1255"><span class="lineNum">    1255</span>              :       {</span>
<span id="L1256"><span class="lineNum">    1256</span>              :         // Allow pos == size() both in C++98 mode, as v3 extension,</span>
<span id="L1257"><span class="lineNum">    1257</span>              :         // and in C++11 mode.</span>
<span id="L1258"><span class="lineNum">    1258</span>              :         __glibcxx_assert(__pos &lt;= size());</span>
<span id="L1259"><span class="lineNum">    1259</span>              :         // In pedantic mode be strict in C++98 mode.</span>
<span id="L1260"><span class="lineNum">    1260</span>              :         _GLIBCXX_DEBUG_PEDASSERT(__cplusplus &gt;= 201103L || __pos &lt; size());</span>
<span id="L1261"><span class="lineNum">    1261</span>              :         return _M_data()[__pos];</span>
<span id="L1262"><span class="lineNum">    1262</span>              :       }</span>
<span id="L1263"><span class="lineNum">    1263</span>              : </span>
<span id="L1264"><span class="lineNum">    1264</span>              :       /**</span>
<span id="L1265"><span class="lineNum">    1265</span>              :        *  @brief  Provides access to the data contained in the %string.</span>
<span id="L1266"><span class="lineNum">    1266</span>              :        *  @param __n The index of the character to access.</span>
<span id="L1267"><span class="lineNum">    1267</span>              :        *  @return  Read-only (const) reference to the character.</span>
<span id="L1268"><span class="lineNum">    1268</span>              :        *  @throw  std::out_of_range  If @a n is an invalid index.</span>
<span id="L1269"><span class="lineNum">    1269</span>              :        *</span>
<span id="L1270"><span class="lineNum">    1270</span>              :        *  This function provides for safer data access.  The parameter is</span>
<span id="L1271"><span class="lineNum">    1271</span>              :        *  first checked that it is in the range of the string.  The function</span>
<span id="L1272"><span class="lineNum">    1272</span>              :        *  throws out_of_range if the check fails.</span>
<span id="L1273"><span class="lineNum">    1273</span>              :        */</span>
<span id="L1274"><span class="lineNum">    1274</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1275"><span class="lineNum">    1275</span>              :       const_reference</span>
<span id="L1276"><span class="lineNum">    1276</span>              :       at(size_type __n) const</span>
<span id="L1277"><span class="lineNum">    1277</span>              :       {</span>
<span id="L1278"><span class="lineNum">    1278</span>              :         if (__n &gt;= this-&gt;size())</span>
<span id="L1279"><span class="lineNum">    1279</span>              :           __throw_out_of_range_fmt(__N(&quot;basic_string::at: __n &quot;</span>
<span id="L1280"><span class="lineNum">    1280</span>              :                                        &quot;(which is %zu) &gt;= this-&gt;size() &quot;</span>
<span id="L1281"><span class="lineNum">    1281</span>              :                                        &quot;(which is %zu)&quot;),</span>
<span id="L1282"><span class="lineNum">    1282</span>              :                                    __n, this-&gt;size());</span>
<span id="L1283"><span class="lineNum">    1283</span>              :         return _M_data()[__n];</span>
<span id="L1284"><span class="lineNum">    1284</span>              :       }</span>
<span id="L1285"><span class="lineNum">    1285</span>              : </span>
<span id="L1286"><span class="lineNum">    1286</span>              :       /**</span>
<span id="L1287"><span class="lineNum">    1287</span>              :        *  @brief  Provides access to the data contained in the %string.</span>
<span id="L1288"><span class="lineNum">    1288</span>              :        *  @param __n The index of the character to access.</span>
<span id="L1289"><span class="lineNum">    1289</span>              :        *  @return  Read/write reference to the character.</span>
<span id="L1290"><span class="lineNum">    1290</span>              :        *  @throw  std::out_of_range  If @a n is an invalid index.</span>
<span id="L1291"><span class="lineNum">    1291</span>              :        *</span>
<span id="L1292"><span class="lineNum">    1292</span>              :        *  This function provides for safer data access.  The parameter is</span>
<span id="L1293"><span class="lineNum">    1293</span>              :        *  first checked that it is in the range of the string.  The function</span>
<span id="L1294"><span class="lineNum">    1294</span>              :        *  throws out_of_range if the check fails.</span>
<span id="L1295"><span class="lineNum">    1295</span>              :        */</span>
<span id="L1296"><span class="lineNum">    1296</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1297"><span class="lineNum">    1297</span>              :       reference</span>
<span id="L1298"><span class="lineNum">    1298</span>              :       at(size_type __n)</span>
<span id="L1299"><span class="lineNum">    1299</span>              :       {</span>
<span id="L1300"><span class="lineNum">    1300</span>              :         if (__n &gt;= size())</span>
<span id="L1301"><span class="lineNum">    1301</span>              :           __throw_out_of_range_fmt(__N(&quot;basic_string::at: __n &quot;</span>
<span id="L1302"><span class="lineNum">    1302</span>              :                                        &quot;(which is %zu) &gt;= this-&gt;size() &quot;</span>
<span id="L1303"><span class="lineNum">    1303</span>              :                                        &quot;(which is %zu)&quot;),</span>
<span id="L1304"><span class="lineNum">    1304</span>              :                                    __n, this-&gt;size());</span>
<span id="L1305"><span class="lineNum">    1305</span>              :         return _M_data()[__n];</span>
<span id="L1306"><span class="lineNum">    1306</span>              :       }</span>
<span id="L1307"><span class="lineNum">    1307</span>              : </span>
<span id="L1308"><span class="lineNum">    1308</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L1309"><span class="lineNum">    1309</span>              :       /**</span>
<span id="L1310"><span class="lineNum">    1310</span>              :        *  Returns a read/write reference to the data at the first</span>
<span id="L1311"><span class="lineNum">    1311</span>              :        *  element of the %string.</span>
<span id="L1312"><span class="lineNum">    1312</span>              :        */</span>
<span id="L1313"><span class="lineNum">    1313</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1314"><span class="lineNum">    1314</span>              :       reference</span>
<span id="L1315"><span class="lineNum">    1315</span>              :       front() noexcept</span>
<span id="L1316"><span class="lineNum">    1316</span>              :       {</span>
<span id="L1317"><span class="lineNum">    1317</span>              :         __glibcxx_assert(!empty());</span>
<span id="L1318"><span class="lineNum">    1318</span>              :         return operator[](0);</span>
<span id="L1319"><span class="lineNum">    1319</span>              :       }</span>
<span id="L1320"><span class="lineNum">    1320</span>              : </span>
<span id="L1321"><span class="lineNum">    1321</span>              :       /**</span>
<span id="L1322"><span class="lineNum">    1322</span>              :        *  Returns a read-only (constant) reference to the data at the first</span>
<span id="L1323"><span class="lineNum">    1323</span>              :        *  element of the %string.</span>
<span id="L1324"><span class="lineNum">    1324</span>              :        */</span>
<span id="L1325"><span class="lineNum">    1325</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1326"><span class="lineNum">    1326</span>              :       const_reference</span>
<span id="L1327"><span class="lineNum">    1327</span>              :       front() const noexcept</span>
<span id="L1328"><span class="lineNum">    1328</span>              :       {</span>
<span id="L1329"><span class="lineNum">    1329</span>              :         __glibcxx_assert(!empty());</span>
<span id="L1330"><span class="lineNum">    1330</span>              :         return operator[](0);</span>
<span id="L1331"><span class="lineNum">    1331</span>              :       }</span>
<span id="L1332"><span class="lineNum">    1332</span>              : </span>
<span id="L1333"><span class="lineNum">    1333</span>              :       /**</span>
<span id="L1334"><span class="lineNum">    1334</span>              :        *  Returns a read/write reference to the data at the last</span>
<span id="L1335"><span class="lineNum">    1335</span>              :        *  element of the %string.</span>
<span id="L1336"><span class="lineNum">    1336</span>              :        */</span>
<span id="L1337"><span class="lineNum">    1337</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1338"><span class="lineNum">    1338</span>              :       reference</span>
<span id="L1339"><span class="lineNum">    1339</span>              :       back() noexcept</span>
<span id="L1340"><span class="lineNum">    1340</span>              :       {</span>
<span id="L1341"><span class="lineNum">    1341</span>              :         __glibcxx_assert(!empty());</span>
<span id="L1342"><span class="lineNum">    1342</span>              :         return operator[](this-&gt;size() - 1);</span>
<span id="L1343"><span class="lineNum">    1343</span>              :       }</span>
<span id="L1344"><span class="lineNum">    1344</span>              : </span>
<span id="L1345"><span class="lineNum">    1345</span>              :       /**</span>
<span id="L1346"><span class="lineNum">    1346</span>              :        *  Returns a read-only (constant) reference to the data at the</span>
<span id="L1347"><span class="lineNum">    1347</span>              :        *  last element of the %string.</span>
<span id="L1348"><span class="lineNum">    1348</span>              :        */</span>
<span id="L1349"><span class="lineNum">    1349</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L1350"><span class="lineNum">    1350</span>              :       const_reference</span>
<span id="L1351"><span class="lineNum">    1351</span>              :       back() const noexcept</span>
<span id="L1352"><span class="lineNum">    1352</span>              :       {</span>
<span id="L1353"><span class="lineNum">    1353</span>              :         __glibcxx_assert(!empty());</span>
<span id="L1354"><span class="lineNum">    1354</span>              :         return operator[](this-&gt;size() - 1);</span>
<span id="L1355"><span class="lineNum">    1355</span>              :       }</span>
<span id="L1356"><span class="lineNum">    1356</span>              : #endif</span>
<span id="L1357"><span class="lineNum">    1357</span>              : </span>
<span id="L1358"><span class="lineNum">    1358</span>              :       // Modifiers:</span>
<span id="L1359"><span class="lineNum">    1359</span>              :       /**</span>
<span id="L1360"><span class="lineNum">    1360</span>              :        *  @brief  Append a string to this string.</span>
<span id="L1361"><span class="lineNum">    1361</span>              :        *  @param __str  The string to append.</span>
<span id="L1362"><span class="lineNum">    1362</span>              :        *  @return  Reference to this string.</span>
<span id="L1363"><span class="lineNum">    1363</span>              :        */</span>
<span id="L1364"><span class="lineNum">    1364</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1365"><span class="lineNum">    1365</span>              :       basic_string&amp;</span>
<span id="L1366"><span class="lineNum">    1366</span>              :       operator+=(const basic_string&amp; __str)</span>
<span id="L1367"><span class="lineNum">    1367</span>              :       { return this-&gt;append(__str); }</span>
<span id="L1368"><span class="lineNum">    1368</span>              : </span>
<span id="L1369"><span class="lineNum">    1369</span>              :       /**</span>
<span id="L1370"><span class="lineNum">    1370</span>              :        *  @brief  Append a C string.</span>
<span id="L1371"><span class="lineNum">    1371</span>              :        *  @param __s  The C string to append.</span>
<span id="L1372"><span class="lineNum">    1372</span>              :        *  @return  Reference to this string.</span>
<span id="L1373"><span class="lineNum">    1373</span>              :        */</span>
<span id="L1374"><span class="lineNum">    1374</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1375"><span class="lineNum">    1375</span>              :       basic_string&amp;</span>
<span id="L1376"><span class="lineNum">    1376</span>              :       operator+=(const _CharT* __s)</span>
<span id="L1377"><span class="lineNum">    1377</span>              :       { return this-&gt;append(__s); }</span>
<span id="L1378"><span class="lineNum">    1378</span>              : </span>
<span id="L1379"><span class="lineNum">    1379</span>              :       /**</span>
<span id="L1380"><span class="lineNum">    1380</span>              :        *  @brief  Append a character.</span>
<span id="L1381"><span class="lineNum">    1381</span>              :        *  @param __c  The character to append.</span>
<span id="L1382"><span class="lineNum">    1382</span>              :        *  @return  Reference to this string.</span>
<span id="L1383"><span class="lineNum">    1383</span>              :        */</span>
<span id="L1384"><span class="lineNum">    1384</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1385"><span class="lineNum">    1385</span>              :       basic_string&amp;</span>
<span id="L1386"><span class="lineNum">    1386</span>              :       operator+=(_CharT __c)</span>
<span id="L1387"><span class="lineNum">    1387</span>              :       {</span>
<span id="L1388"><span class="lineNum">    1388</span>              :         this-&gt;push_back(__c);</span>
<span id="L1389"><span class="lineNum">    1389</span>              :         return *this;</span>
<span id="L1390"><span class="lineNum">    1390</span>              :       }</span>
<span id="L1391"><span class="lineNum">    1391</span>              : </span>
<span id="L1392"><span class="lineNum">    1392</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L1393"><span class="lineNum">    1393</span>              :       /**</span>
<span id="L1394"><span class="lineNum">    1394</span>              :        *  @brief  Append an initializer_list of characters.</span>
<span id="L1395"><span class="lineNum">    1395</span>              :        *  @param __l  The initializer_list of characters to be appended.</span>
<span id="L1396"><span class="lineNum">    1396</span>              :        *  @return  Reference to this string.</span>
<span id="L1397"><span class="lineNum">    1397</span>              :        */</span>
<span id="L1398"><span class="lineNum">    1398</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1399"><span class="lineNum">    1399</span>              :       basic_string&amp;</span>
<span id="L1400"><span class="lineNum">    1400</span>              :       operator+=(initializer_list&lt;_CharT&gt; __l)</span>
<span id="L1401"><span class="lineNum">    1401</span>              :       { return this-&gt;append(__l.begin(), __l.size()); }</span>
<span id="L1402"><span class="lineNum">    1402</span>              : #endif // C++11</span>
<span id="L1403"><span class="lineNum">    1403</span>              : </span>
<span id="L1404"><span class="lineNum">    1404</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L1405"><span class="lineNum">    1405</span>              :       /**</span>
<span id="L1406"><span class="lineNum">    1406</span>              :        *  @brief  Append a string_view.</span>
<span id="L1407"><span class="lineNum">    1407</span>              :        *  @param __svt  An object convertible to string_view to be appended.</span>
<span id="L1408"><span class="lineNum">    1408</span>              :        *  @return  Reference to this string.</span>
<span id="L1409"><span class="lineNum">    1409</span>              :        */</span>
<span id="L1410"><span class="lineNum">    1410</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L1411"><span class="lineNum">    1411</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L1412"><span class="lineNum">    1412</span>              :         _If_sv&lt;_Tp, basic_string&amp;&gt;</span>
<span id="L1413"><span class="lineNum">    1413</span>              :         operator+=(const _Tp&amp; __svt)</span>
<span id="L1414"><span class="lineNum">    1414</span>              :         { return this-&gt;append(__svt); }</span>
<span id="L1415"><span class="lineNum">    1415</span>              : #endif // C++17</span>
<span id="L1416"><span class="lineNum">    1416</span>              : </span>
<span id="L1417"><span class="lineNum">    1417</span>              :       /**</span>
<span id="L1418"><span class="lineNum">    1418</span>              :        *  @brief  Append a string to this string.</span>
<span id="L1419"><span class="lineNum">    1419</span>              :        *  @param __str  The string to append.</span>
<span id="L1420"><span class="lineNum">    1420</span>              :        *  @return  Reference to this string.</span>
<span id="L1421"><span class="lineNum">    1421</span>              :        */</span>
<span id="L1422"><span class="lineNum">    1422</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1423"><span class="lineNum">    1423</span>              :       basic_string&amp;</span>
<span id="L1424"><span class="lineNum">    1424</span>              :       append(const basic_string&amp; __str)</span>
<span id="L1425"><span class="lineNum">    1425</span>              :       { return this-&gt;append(__str._M_data(), __str.size()); }</span>
<span id="L1426"><span class="lineNum">    1426</span>              : </span>
<span id="L1427"><span class="lineNum">    1427</span>              :       /**</span>
<span id="L1428"><span class="lineNum">    1428</span>              :        *  @brief  Append a substring.</span>
<span id="L1429"><span class="lineNum">    1429</span>              :        *  @param __str  The string to append.</span>
<span id="L1430"><span class="lineNum">    1430</span>              :        *  @param __pos  Index of the first character of str to append.</span>
<span id="L1431"><span class="lineNum">    1431</span>              :        *  @param __n  The number of characters to append.</span>
<span id="L1432"><span class="lineNum">    1432</span>              :        *  @return  Reference to this string.</span>
<span id="L1433"><span class="lineNum">    1433</span>              :        *  @throw  std::out_of_range if @a __pos is not a valid index.</span>
<span id="L1434"><span class="lineNum">    1434</span>              :        *</span>
<span id="L1435"><span class="lineNum">    1435</span>              :        *  This function appends @a __n characters from @a __str</span>
<span id="L1436"><span class="lineNum">    1436</span>              :        *  starting at @a __pos to this string.  If @a __n is is larger</span>
<span id="L1437"><span class="lineNum">    1437</span>              :        *  than the number of available characters in @a __str, the</span>
<span id="L1438"><span class="lineNum">    1438</span>              :        *  remainder of @a __str is appended.</span>
<span id="L1439"><span class="lineNum">    1439</span>              :        */</span>
<span id="L1440"><span class="lineNum">    1440</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1441"><span class="lineNum">    1441</span>              :       basic_string&amp;</span>
<span id="L1442"><span class="lineNum">    1442</span>              :       append(const basic_string&amp; __str, size_type __pos, size_type __n = npos)</span>
<span id="L1443"><span class="lineNum">    1443</span>              :       { return this-&gt;append(__str._M_data()</span>
<span id="L1444"><span class="lineNum">    1444</span>              :                             + __str._M_check(__pos, &quot;basic_string::append&quot;),</span>
<span id="L1445"><span class="lineNum">    1445</span>              :                             __str._M_limit(__pos, __n)); }</span>
<span id="L1446"><span class="lineNum">    1446</span>              : </span>
<span id="L1447"><span class="lineNum">    1447</span>              :       /**</span>
<span id="L1448"><span class="lineNum">    1448</span>              :        *  @brief  Append a C substring.</span>
<span id="L1449"><span class="lineNum">    1449</span>              :        *  @param __s  The C string to append.</span>
<span id="L1450"><span class="lineNum">    1450</span>              :        *  @param __n  The number of characters to append.</span>
<span id="L1451"><span class="lineNum">    1451</span>              :        *  @return  Reference to this string.</span>
<span id="L1452"><span class="lineNum">    1452</span>              :        */</span>
<span id="L1453"><span class="lineNum">    1453</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1454"><span class="lineNum">    1454</span>              :       basic_string&amp;</span>
<span id="L1455"><span class="lineNum">    1455</span>              :       append(const _CharT* __s, size_type __n)</span>
<span id="L1456"><span class="lineNum">    1456</span>              :       {</span>
<span id="L1457"><span class="lineNum">    1457</span>              :         __glibcxx_requires_string_len(__s, __n);</span>
<span id="L1458"><span class="lineNum">    1458</span>              :         _M_check_length(size_type(0), __n, &quot;basic_string::append&quot;);</span>
<span id="L1459"><span class="lineNum">    1459</span>              :         return _M_append(__s, __n);</span>
<span id="L1460"><span class="lineNum">    1460</span>              :       }</span>
<span id="L1461"><span class="lineNum">    1461</span>              : </span>
<span id="L1462"><span class="lineNum">    1462</span>              :       /**</span>
<span id="L1463"><span class="lineNum">    1463</span>              :        *  @brief  Append a C string.</span>
<span id="L1464"><span class="lineNum">    1464</span>              :        *  @param __s  The C string to append.</span>
<span id="L1465"><span class="lineNum">    1465</span>              :        *  @return  Reference to this string.</span>
<span id="L1466"><span class="lineNum">    1466</span>              :        */</span>
<span id="L1467"><span class="lineNum">    1467</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1468"><span class="lineNum">    1468</span>              :       basic_string&amp;</span>
<span id="L1469"><span class="lineNum">    1469</span>              :       append(const _CharT* __s)</span>
<span id="L1470"><span class="lineNum">    1470</span>              :       {</span>
<span id="L1471"><span class="lineNum">    1471</span>              :         __glibcxx_requires_string(__s);</span>
<span id="L1472"><span class="lineNum">    1472</span>              :         const size_type __n = traits_type::length(__s);</span>
<span id="L1473"><span class="lineNum">    1473</span>              :         _M_check_length(size_type(0), __n, &quot;basic_string::append&quot;);</span>
<span id="L1474"><span class="lineNum">    1474</span>              :         return _M_append(__s, __n);</span>
<span id="L1475"><span class="lineNum">    1475</span>              :       }</span>
<span id="L1476"><span class="lineNum">    1476</span>              : </span>
<span id="L1477"><span class="lineNum">    1477</span>              :       /**</span>
<span id="L1478"><span class="lineNum">    1478</span>              :        *  @brief  Append multiple characters.</span>
<span id="L1479"><span class="lineNum">    1479</span>              :        *  @param __n  The number of characters to append.</span>
<span id="L1480"><span class="lineNum">    1480</span>              :        *  @param __c  The character to use.</span>
<span id="L1481"><span class="lineNum">    1481</span>              :        *  @return  Reference to this string.</span>
<span id="L1482"><span class="lineNum">    1482</span>              :        *</span>
<span id="L1483"><span class="lineNum">    1483</span>              :        *  Appends __n copies of __c to this string.</span>
<span id="L1484"><span class="lineNum">    1484</span>              :        */</span>
<span id="L1485"><span class="lineNum">    1485</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1486"><span class="lineNum">    1486</span>              :       basic_string&amp;</span>
<span id="L1487"><span class="lineNum">    1487</span>              :       append(size_type __n, _CharT __c)</span>
<span id="L1488"><span class="lineNum">    1488</span>              :       { return _M_replace_aux(this-&gt;size(), size_type(0), __n, __c); }</span>
<span id="L1489"><span class="lineNum">    1489</span>              : </span>
<span id="L1490"><span class="lineNum">    1490</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L1491"><span class="lineNum">    1491</span>              :       /**</span>
<span id="L1492"><span class="lineNum">    1492</span>              :        *  @brief  Append an initializer_list of characters.</span>
<span id="L1493"><span class="lineNum">    1493</span>              :        *  @param __l  The initializer_list of characters to append.</span>
<span id="L1494"><span class="lineNum">    1494</span>              :        *  @return  Reference to this string.</span>
<span id="L1495"><span class="lineNum">    1495</span>              :        */</span>
<span id="L1496"><span class="lineNum">    1496</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1497"><span class="lineNum">    1497</span>              :       basic_string&amp;</span>
<span id="L1498"><span class="lineNum">    1498</span>              :       append(initializer_list&lt;_CharT&gt; __l)</span>
<span id="L1499"><span class="lineNum">    1499</span>              :       { return this-&gt;append(__l.begin(), __l.size()); }</span>
<span id="L1500"><span class="lineNum">    1500</span>              : #endif // C++11</span>
<span id="L1501"><span class="lineNum">    1501</span>              : </span>
<span id="L1502"><span class="lineNum">    1502</span>              :       /**</span>
<span id="L1503"><span class="lineNum">    1503</span>              :        *  @brief  Append a range of characters.</span>
<span id="L1504"><span class="lineNum">    1504</span>              :        *  @param __first  Iterator referencing the first character to append.</span>
<span id="L1505"><span class="lineNum">    1505</span>              :        *  @param __last  Iterator marking the end of the range.</span>
<span id="L1506"><span class="lineNum">    1506</span>              :        *  @return  Reference to this string.</span>
<span id="L1507"><span class="lineNum">    1507</span>              :        *</span>
<span id="L1508"><span class="lineNum">    1508</span>              :        *  Appends characters in the range [__first,__last) to this string.</span>
<span id="L1509"><span class="lineNum">    1509</span>              :        */</span>
<span id="L1510"><span class="lineNum">    1510</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L1511"><span class="lineNum">    1511</span>              :       template&lt;class _InputIterator,</span>
<span id="L1512"><span class="lineNum">    1512</span>              :                typename = std::_RequireInputIter&lt;_InputIterator&gt;&gt;</span>
<span id="L1513"><span class="lineNum">    1513</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L1514"><span class="lineNum">    1514</span>              : #else</span>
<span id="L1515"><span class="lineNum">    1515</span>              :       template&lt;class _InputIterator&gt;</span>
<span id="L1516"><span class="lineNum">    1516</span>              : #endif</span>
<span id="L1517"><span class="lineNum">    1517</span>              :         basic_string&amp;</span>
<span id="L1518"><span class="lineNum">    1518</span>              :         append(_InputIterator __first, _InputIterator __last)</span>
<span id="L1519"><span class="lineNum">    1519</span>              :         { return this-&gt;replace(end(), end(), __first, __last); }</span>
<span id="L1520"><span class="lineNum">    1520</span>              : </span>
<span id="L1521"><span class="lineNum">    1521</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L1522"><span class="lineNum">    1522</span>              :       /**</span>
<span id="L1523"><span class="lineNum">    1523</span>              :        *  @brief  Append a string_view.</span>
<span id="L1524"><span class="lineNum">    1524</span>              :        *  @param __svt  An object convertible to string_view to be appended.</span>
<span id="L1525"><span class="lineNum">    1525</span>              :        *  @return  Reference to this string.</span>
<span id="L1526"><span class="lineNum">    1526</span>              :        */</span>
<span id="L1527"><span class="lineNum">    1527</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L1528"><span class="lineNum">    1528</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L1529"><span class="lineNum">    1529</span>              :         _If_sv&lt;_Tp, basic_string&amp;&gt;</span>
<span id="L1530"><span class="lineNum">    1530</span>              :         append(const _Tp&amp; __svt)</span>
<span id="L1531"><span class="lineNum">    1531</span>              :         {</span>
<span id="L1532"><span class="lineNum">    1532</span>              :           __sv_type __sv = __svt;</span>
<span id="L1533"><span class="lineNum">    1533</span>              :           return this-&gt;append(__sv.data(), __sv.size());</span>
<span id="L1534"><span class="lineNum">    1534</span>              :         }</span>
<span id="L1535"><span class="lineNum">    1535</span>              : </span>
<span id="L1536"><span class="lineNum">    1536</span>              :       /**</span>
<span id="L1537"><span class="lineNum">    1537</span>              :        *  @brief  Append a range of characters from a string_view.</span>
<span id="L1538"><span class="lineNum">    1538</span>              :        *  @param __svt  An object convertible to string_view to be appended from.</span>
<span id="L1539"><span class="lineNum">    1539</span>              :        *  @param __pos The position in the string_view to append from.</span>
<span id="L1540"><span class="lineNum">    1540</span>              :        *  @param __n   The number of characters to append from the string_view.</span>
<span id="L1541"><span class="lineNum">    1541</span>              :        *  @return  Reference to this string.</span>
<span id="L1542"><span class="lineNum">    1542</span>              :        */</span>
<span id="L1543"><span class="lineNum">    1543</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L1544"><span class="lineNum">    1544</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L1545"><span class="lineNum">    1545</span>              :         _If_sv&lt;_Tp, basic_string&amp;&gt;</span>
<span id="L1546"><span class="lineNum">    1546</span>              :         append(const _Tp&amp; __svt, size_type __pos, size_type __n = npos)</span>
<span id="L1547"><span class="lineNum">    1547</span>              :         {</span>
<span id="L1548"><span class="lineNum">    1548</span>              :           __sv_type __sv = __svt;</span>
<span id="L1549"><span class="lineNum">    1549</span>              :           return _M_append(__sv.data()</span>
<span id="L1550"><span class="lineNum">    1550</span>              :               + std::__sv_check(__sv.size(), __pos, &quot;basic_string::append&quot;),</span>
<span id="L1551"><span class="lineNum">    1551</span>              :               std::__sv_limit(__sv.size(), __pos, __n));</span>
<span id="L1552"><span class="lineNum">    1552</span>              :         }</span>
<span id="L1553"><span class="lineNum">    1553</span>              : #endif // C++17</span>
<span id="L1554"><span class="lineNum">    1554</span>              : </span>
<span id="L1555"><span class="lineNum">    1555</span>              :       /**</span>
<span id="L1556"><span class="lineNum">    1556</span>              :        *  @brief  Append a single character.</span>
<span id="L1557"><span class="lineNum">    1557</span>              :        *  @param __c  Character to append.</span>
<span id="L1558"><span class="lineNum">    1558</span>              :        */</span>
<span id="L1559"><span class="lineNum">    1559</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1560"><span class="lineNum">    1560</span>              :       void</span>
<span id="L1561"><span class="lineNum">    1561</span>              :       push_back(_CharT __c)</span>
<span id="L1562"><span class="lineNum">    1562</span>              :       {</span>
<span id="L1563"><span class="lineNum">    1563</span>              :         const size_type __size = this-&gt;size();</span>
<span id="L1564"><span class="lineNum">    1564</span>              :         if (__size + 1 &gt; this-&gt;capacity())</span>
<span id="L1565"><span class="lineNum">    1565</span>              :           this-&gt;_M_mutate(__size, size_type(0), 0, size_type(1));</span>
<span id="L1566"><span class="lineNum">    1566</span>              :         traits_type::assign(this-&gt;_M_data()[__size], __c);</span>
<span id="L1567"><span class="lineNum">    1567</span>              :         this-&gt;_M_set_length(__size + 1);</span>
<span id="L1568"><span class="lineNum">    1568</span>              :       }</span>
<span id="L1569"><span class="lineNum">    1569</span>              : </span>
<span id="L1570"><span class="lineNum">    1570</span>              :       /**</span>
<span id="L1571"><span class="lineNum">    1571</span>              :        *  @brief  Set value to contents of another string.</span>
<span id="L1572"><span class="lineNum">    1572</span>              :        *  @param  __str  Source string to use.</span>
<span id="L1573"><span class="lineNum">    1573</span>              :        *  @return  Reference to this string.</span>
<span id="L1574"><span class="lineNum">    1574</span>              :        */</span>
<span id="L1575"><span class="lineNum">    1575</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1576"><span class="lineNum">    1576</span>              :       basic_string&amp;</span>
<span id="L1577"><span class="lineNum">    1577</span>              :       assign(const basic_string&amp; __str)</span>
<span id="L1578"><span class="lineNum">    1578</span>              :       {</span>
<span id="L1579"><span class="lineNum">    1579</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L1580"><span class="lineNum">    1580</span>              :         if (_Alloc_traits::_S_propagate_on_copy_assign())</span>
<span id="L1581"><span class="lineNum">    1581</span>              :           {</span>
<span id="L1582"><span class="lineNum">    1582</span>              :             if (!_Alloc_traits::_S_always_equal() &amp;&amp; !_M_is_local()</span>
<span id="L1583"><span class="lineNum">    1583</span>              :                 &amp;&amp; _M_get_allocator() != __str._M_get_allocator())</span>
<span id="L1584"><span class="lineNum">    1584</span>              :               {</span>
<span id="L1585"><span class="lineNum">    1585</span>              :                 // Propagating allocator cannot free existing storage so must</span>
<span id="L1586"><span class="lineNum">    1586</span>              :                 // deallocate it before replacing current allocator.</span>
<span id="L1587"><span class="lineNum">    1587</span>              :                 if (__str.size() &lt;= _S_local_capacity)</span>
<span id="L1588"><span class="lineNum">    1588</span>              :                   {</span>
<span id="L1589"><span class="lineNum">    1589</span>              :                     _M_destroy(_M_allocated_capacity);</span>
<span id="L1590"><span class="lineNum">    1590</span>              :                     _M_data(_M_use_local_data());</span>
<span id="L1591"><span class="lineNum">    1591</span>              :                     _M_set_length(0);</span>
<span id="L1592"><span class="lineNum">    1592</span>              :                   }</span>
<span id="L1593"><span class="lineNum">    1593</span>              :                 else</span>
<span id="L1594"><span class="lineNum">    1594</span>              :                   {</span>
<span id="L1595"><span class="lineNum">    1595</span>              :                     const auto __len = __str.size();</span>
<span id="L1596"><span class="lineNum">    1596</span>              :                     auto __alloc = __str._M_get_allocator();</span>
<span id="L1597"><span class="lineNum">    1597</span>              :                     // If this allocation throws there are no effects:</span>
<span id="L1598"><span class="lineNum">    1598</span>              :                     auto __ptr = _S_allocate(__alloc, __len + 1);</span>
<span id="L1599"><span class="lineNum">    1599</span>              :                     _M_destroy(_M_allocated_capacity);</span>
<span id="L1600"><span class="lineNum">    1600</span>              :                     _M_data(__ptr);</span>
<span id="L1601"><span class="lineNum">    1601</span>              :                     _M_capacity(__len);</span>
<span id="L1602"><span class="lineNum">    1602</span>              :                     _M_set_length(__len);</span>
<span id="L1603"><span class="lineNum">    1603</span>              :                   }</span>
<span id="L1604"><span class="lineNum">    1604</span>              :               }</span>
<span id="L1605"><span class="lineNum">    1605</span>              :             std::__alloc_on_copy(_M_get_allocator(), __str._M_get_allocator());</span>
<span id="L1606"><span class="lineNum">    1606</span>              :           }</span>
<span id="L1607"><span class="lineNum">    1607</span>              : #endif</span>
<span id="L1608"><span class="lineNum">    1608</span>              :         this-&gt;_M_assign(__str);</span>
<span id="L1609"><span class="lineNum">    1609</span>              :         return *this;</span>
<span id="L1610"><span class="lineNum">    1610</span>              :       }</span>
<span id="L1611"><span class="lineNum">    1611</span>              : </span>
<span id="L1612"><span class="lineNum">    1612</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L1613"><span class="lineNum">    1613</span>              :       /**</span>
<span id="L1614"><span class="lineNum">    1614</span>              :        *  @brief  Set value to contents of another string.</span>
<span id="L1615"><span class="lineNum">    1615</span>              :        *  @param  __str  Source string to use.</span>
<span id="L1616"><span class="lineNum">    1616</span>              :        *  @return  Reference to this string.</span>
<span id="L1617"><span class="lineNum">    1617</span>              :        *</span>
<span id="L1618"><span class="lineNum">    1618</span>              :        *  This function sets this string to the exact contents of @a __str.</span>
<span id="L1619"><span class="lineNum">    1619</span>              :        *  @a __str is a valid, but unspecified string.</span>
<span id="L1620"><span class="lineNum">    1620</span>              :        */</span>
<span id="L1621"><span class="lineNum">    1621</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1622"><span class="lineNum">    1622</span>              :       basic_string&amp;</span>
<span id="L1623"><span class="lineNum">    1623</span>              :       assign(basic_string&amp;&amp; __str)</span>
<span id="L1624"><span class="lineNum">    1624</span>              :       noexcept(_Alloc_traits::_S_nothrow_move())</span>
<span id="L1625"><span class="lineNum">    1625</span>              :       {</span>
<span id="L1626"><span class="lineNum">    1626</span>              :         // _GLIBCXX_RESOLVE_LIB_DEFECTS</span>
<span id="L1627"><span class="lineNum">    1627</span>              :         // 2063. Contradictory requirements for string move assignment</span>
<span id="L1628"><span class="lineNum">    1628</span>              :         return *this = std::move(__str);</span>
<span id="L1629"><span class="lineNum">    1629</span>              :       }</span>
<span id="L1630"><span class="lineNum">    1630</span>              : #endif // C++11</span>
<span id="L1631"><span class="lineNum">    1631</span>              : </span>
<span id="L1632"><span class="lineNum">    1632</span>              :       /**</span>
<span id="L1633"><span class="lineNum">    1633</span>              :        *  @brief  Set value to a substring of a string.</span>
<span id="L1634"><span class="lineNum">    1634</span>              :        *  @param __str  The string to use.</span>
<span id="L1635"><span class="lineNum">    1635</span>              :        *  @param __pos  Index of the first character of str.</span>
<span id="L1636"><span class="lineNum">    1636</span>              :        *  @param __n  Number of characters to use.</span>
<span id="L1637"><span class="lineNum">    1637</span>              :        *  @return  Reference to this string.</span>
<span id="L1638"><span class="lineNum">    1638</span>              :        *  @throw  std::out_of_range if @a pos is not a valid index.</span>
<span id="L1639"><span class="lineNum">    1639</span>              :        *</span>
<span id="L1640"><span class="lineNum">    1640</span>              :        *  This function sets this string to the substring of @a __str</span>
<span id="L1641"><span class="lineNum">    1641</span>              :        *  consisting of @a __n characters at @a __pos.  If @a __n is</span>
<span id="L1642"><span class="lineNum">    1642</span>              :        *  is larger than the number of available characters in @a</span>
<span id="L1643"><span class="lineNum">    1643</span>              :        *  __str, the remainder of @a __str is used.</span>
<span id="L1644"><span class="lineNum">    1644</span>              :        */</span>
<span id="L1645"><span class="lineNum">    1645</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1646"><span class="lineNum">    1646</span>              :       basic_string&amp;</span>
<span id="L1647"><span class="lineNum">    1647</span>              :       assign(const basic_string&amp; __str, size_type __pos, size_type __n = npos)</span>
<span id="L1648"><span class="lineNum">    1648</span>              :       { return _M_replace(size_type(0), this-&gt;size(), __str._M_data()</span>
<span id="L1649"><span class="lineNum">    1649</span>              :                           + __str._M_check(__pos, &quot;basic_string::assign&quot;),</span>
<span id="L1650"><span class="lineNum">    1650</span>              :                           __str._M_limit(__pos, __n)); }</span>
<span id="L1651"><span class="lineNum">    1651</span>              : </span>
<span id="L1652"><span class="lineNum">    1652</span>              :       /**</span>
<span id="L1653"><span class="lineNum">    1653</span>              :        *  @brief  Set value to a C substring.</span>
<span id="L1654"><span class="lineNum">    1654</span>              :        *  @param __s  The C string to use.</span>
<span id="L1655"><span class="lineNum">    1655</span>              :        *  @param __n  Number of characters to use.</span>
<span id="L1656"><span class="lineNum">    1656</span>              :        *  @return  Reference to this string.</span>
<span id="L1657"><span class="lineNum">    1657</span>              :        *</span>
<span id="L1658"><span class="lineNum">    1658</span>              :        *  This function sets the value of this string to the first @a __n</span>
<span id="L1659"><span class="lineNum">    1659</span>              :        *  characters of @a __s.  If @a __n is is larger than the number of</span>
<span id="L1660"><span class="lineNum">    1660</span>              :        *  available characters in @a __s, the remainder of @a __s is used.</span>
<span id="L1661"><span class="lineNum">    1661</span>              :        */</span>
<span id="L1662"><span class="lineNum">    1662</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1663"><span class="lineNum">    1663</span>              :       basic_string&amp;</span>
<span id="L1664"><span class="lineNum">    1664</span>              :       assign(const _CharT* __s, size_type __n)</span>
<span id="L1665"><span class="lineNum">    1665</span>              :       {</span>
<span id="L1666"><span class="lineNum">    1666</span>              :         __glibcxx_requires_string_len(__s, __n);</span>
<span id="L1667"><span class="lineNum">    1667</span>              :         return _M_replace(size_type(0), this-&gt;size(), __s, __n);</span>
<span id="L1668"><span class="lineNum">    1668</span>              :       }</span>
<span id="L1669"><span class="lineNum">    1669</span>              : </span>
<span id="L1670"><span class="lineNum">    1670</span>              :       /**</span>
<span id="L1671"><span class="lineNum">    1671</span>              :        *  @brief  Set value to contents of a C string.</span>
<span id="L1672"><span class="lineNum">    1672</span>              :        *  @param __s  The C string to use.</span>
<span id="L1673"><span class="lineNum">    1673</span>              :        *  @return  Reference to this string.</span>
<span id="L1674"><span class="lineNum">    1674</span>              :        *</span>
<span id="L1675"><span class="lineNum">    1675</span>              :        *  This function sets the value of this string to the value of @a __s.</span>
<span id="L1676"><span class="lineNum">    1676</span>              :        *  The data is copied, so there is no dependence on @a __s once the</span>
<span id="L1677"><span class="lineNum">    1677</span>              :        *  function returns.</span>
<span id="L1678"><span class="lineNum">    1678</span>              :        */</span>
<span id="L1679"><span class="lineNum">    1679</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1680"><span class="lineNum">    1680</span>              :       basic_string&amp;</span>
<span id="L1681"><span class="lineNum">    1681</span>              :       assign(const _CharT* __s)</span>
<span id="L1682"><span class="lineNum">    1682</span>              :       {</span>
<span id="L1683"><span class="lineNum">    1683</span>              :         __glibcxx_requires_string(__s);</span>
<span id="L1684"><span class="lineNum">    1684</span>              :         return _M_replace(size_type(0), this-&gt;size(), __s,</span>
<span id="L1685"><span class="lineNum">    1685</span>              :                           traits_type::length(__s));</span>
<span id="L1686"><span class="lineNum">    1686</span>              :       }</span>
<span id="L1687"><span class="lineNum">    1687</span>              : </span>
<span id="L1688"><span class="lineNum">    1688</span>              :       /**</span>
<span id="L1689"><span class="lineNum">    1689</span>              :        *  @brief  Set value to multiple characters.</span>
<span id="L1690"><span class="lineNum">    1690</span>              :        *  @param __n  Length of the resulting string.</span>
<span id="L1691"><span class="lineNum">    1691</span>              :        *  @param __c  The character to use.</span>
<span id="L1692"><span class="lineNum">    1692</span>              :        *  @return  Reference to this string.</span>
<span id="L1693"><span class="lineNum">    1693</span>              :        *</span>
<span id="L1694"><span class="lineNum">    1694</span>              :        *  This function sets the value of this string to @a __n copies of</span>
<span id="L1695"><span class="lineNum">    1695</span>              :        *  character @a __c.</span>
<span id="L1696"><span class="lineNum">    1696</span>              :        */</span>
<span id="L1697"><span class="lineNum">    1697</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1698"><span class="lineNum">    1698</span>              :       basic_string&amp;</span>
<span id="L1699"><span class="lineNum">    1699</span>              :       assign(size_type __n, _CharT __c)</span>
<span id="L1700"><span class="lineNum">    1700</span>              :       { return _M_replace_aux(size_type(0), this-&gt;size(), __n, __c); }</span>
<span id="L1701"><span class="lineNum">    1701</span>              : </span>
<span id="L1702"><span class="lineNum">    1702</span>              :       /**</span>
<span id="L1703"><span class="lineNum">    1703</span>              :        *  @brief  Set value to a range of characters.</span>
<span id="L1704"><span class="lineNum">    1704</span>              :        *  @param __first  Iterator referencing the first character to append.</span>
<span id="L1705"><span class="lineNum">    1705</span>              :        *  @param __last  Iterator marking the end of the range.</span>
<span id="L1706"><span class="lineNum">    1706</span>              :        *  @return  Reference to this string.</span>
<span id="L1707"><span class="lineNum">    1707</span>              :        *</span>
<span id="L1708"><span class="lineNum">    1708</span>              :        *  Sets value of string to characters in the range [__first,__last).</span>
<span id="L1709"><span class="lineNum">    1709</span>              :       */</span>
<span id="L1710"><span class="lineNum">    1710</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L1711"><span class="lineNum">    1711</span>              :       template&lt;class _InputIterator,</span>
<span id="L1712"><span class="lineNum">    1712</span>              :                typename = std::_RequireInputIter&lt;_InputIterator&gt;&gt;</span>
<span id="L1713"><span class="lineNum">    1713</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L1714"><span class="lineNum">    1714</span>              : #else</span>
<span id="L1715"><span class="lineNum">    1715</span>              :       template&lt;class _InputIterator&gt;</span>
<span id="L1716"><span class="lineNum">    1716</span>              : #endif</span>
<span id="L1717"><span class="lineNum">    1717</span>              :         basic_string&amp;</span>
<span id="L1718"><span class="lineNum">    1718</span>              :         assign(_InputIterator __first, _InputIterator __last)</span>
<span id="L1719"><span class="lineNum">    1719</span>              :         { return this-&gt;replace(begin(), end(), __first, __last); }</span>
<span id="L1720"><span class="lineNum">    1720</span>              : </span>
<span id="L1721"><span class="lineNum">    1721</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L1722"><span class="lineNum">    1722</span>              :       /**</span>
<span id="L1723"><span class="lineNum">    1723</span>              :        *  @brief  Set value to an initializer_list of characters.</span>
<span id="L1724"><span class="lineNum">    1724</span>              :        *  @param __l  The initializer_list of characters to assign.</span>
<span id="L1725"><span class="lineNum">    1725</span>              :        *  @return  Reference to this string.</span>
<span id="L1726"><span class="lineNum">    1726</span>              :        */</span>
<span id="L1727"><span class="lineNum">    1727</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1728"><span class="lineNum">    1728</span>              :       basic_string&amp;</span>
<span id="L1729"><span class="lineNum">    1729</span>              :       assign(initializer_list&lt;_CharT&gt; __l)</span>
<span id="L1730"><span class="lineNum">    1730</span>              :       { return this-&gt;assign(__l.begin(), __l.size()); }</span>
<span id="L1731"><span class="lineNum">    1731</span>              : #endif // C++11</span>
<span id="L1732"><span class="lineNum">    1732</span>              : </span>
<span id="L1733"><span class="lineNum">    1733</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L1734"><span class="lineNum">    1734</span>              :       /**</span>
<span id="L1735"><span class="lineNum">    1735</span>              :        *  @brief  Set value from a string_view.</span>
<span id="L1736"><span class="lineNum">    1736</span>              :        *  @param __svt  The source object convertible to string_view.</span>
<span id="L1737"><span class="lineNum">    1737</span>              :        *  @return  Reference to this string.</span>
<span id="L1738"><span class="lineNum">    1738</span>              :        */</span>
<span id="L1739"><span class="lineNum">    1739</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L1740"><span class="lineNum">    1740</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L1741"><span class="lineNum">    1741</span>              :         _If_sv&lt;_Tp, basic_string&amp;&gt;</span>
<span id="L1742"><span class="lineNum">    1742</span>              :         assign(const _Tp&amp; __svt)</span>
<span id="L1743"><span class="lineNum">    1743</span>              :         {</span>
<span id="L1744"><span class="lineNum">    1744</span>              :           __sv_type __sv = __svt;</span>
<span id="L1745"><span class="lineNum">    1745</span>              :           return this-&gt;assign(__sv.data(), __sv.size());</span>
<span id="L1746"><span class="lineNum">    1746</span>              :         }</span>
<span id="L1747"><span class="lineNum">    1747</span>              : </span>
<span id="L1748"><span class="lineNum">    1748</span>              :       /**</span>
<span id="L1749"><span class="lineNum">    1749</span>              :        *  @brief  Set value from a range of characters in a string_view.</span>
<span id="L1750"><span class="lineNum">    1750</span>              :        *  @param __svt  The source object convertible to string_view.</span>
<span id="L1751"><span class="lineNum">    1751</span>              :        *  @param __pos  The position in the string_view to assign from.</span>
<span id="L1752"><span class="lineNum">    1752</span>              :        *  @param __n  The number of characters to assign.</span>
<span id="L1753"><span class="lineNum">    1753</span>              :        *  @return  Reference to this string.</span>
<span id="L1754"><span class="lineNum">    1754</span>              :        */</span>
<span id="L1755"><span class="lineNum">    1755</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L1756"><span class="lineNum">    1756</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L1757"><span class="lineNum">    1757</span>              :         _If_sv&lt;_Tp, basic_string&amp;&gt;</span>
<span id="L1758"><span class="lineNum">    1758</span>              :         assign(const _Tp&amp; __svt, size_type __pos, size_type __n = npos)</span>
<span id="L1759"><span class="lineNum">    1759</span>              :         {</span>
<span id="L1760"><span class="lineNum">    1760</span>              :           __sv_type __sv = __svt;</span>
<span id="L1761"><span class="lineNum">    1761</span>              :           return _M_replace(size_type(0), this-&gt;size(),</span>
<span id="L1762"><span class="lineNum">    1762</span>              :               __sv.data()</span>
<span id="L1763"><span class="lineNum">    1763</span>              :               + std::__sv_check(__sv.size(), __pos, &quot;basic_string::assign&quot;),</span>
<span id="L1764"><span class="lineNum">    1764</span>              :               std::__sv_limit(__sv.size(), __pos, __n));</span>
<span id="L1765"><span class="lineNum">    1765</span>              :         }</span>
<span id="L1766"><span class="lineNum">    1766</span>              : #endif // C++17</span>
<span id="L1767"><span class="lineNum">    1767</span>              : </span>
<span id="L1768"><span class="lineNum">    1768</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L1769"><span class="lineNum">    1769</span>              :       /**</span>
<span id="L1770"><span class="lineNum">    1770</span>              :        *  @brief  Insert multiple characters.</span>
<span id="L1771"><span class="lineNum">    1771</span>              :        *  @param __p  Const_iterator referencing location in string to</span>
<span id="L1772"><span class="lineNum">    1772</span>              :        *              insert at.</span>
<span id="L1773"><span class="lineNum">    1773</span>              :        *  @param __n  Number of characters to insert</span>
<span id="L1774"><span class="lineNum">    1774</span>              :        *  @param __c  The character to insert.</span>
<span id="L1775"><span class="lineNum">    1775</span>              :        *  @return  Iterator referencing the first inserted char.</span>
<span id="L1776"><span class="lineNum">    1776</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L1777"><span class="lineNum">    1777</span>              :        *</span>
<span id="L1778"><span class="lineNum">    1778</span>              :        *  Inserts @a __n copies of character @a __c starting at the</span>
<span id="L1779"><span class="lineNum">    1779</span>              :        *  position referenced by iterator @a __p.  If adding</span>
<span id="L1780"><span class="lineNum">    1780</span>              :        *  characters causes the length to exceed max_size(),</span>
<span id="L1781"><span class="lineNum">    1781</span>              :        *  length_error is thrown.  The value of the string doesn't</span>
<span id="L1782"><span class="lineNum">    1782</span>              :        *  change if an error is thrown.</span>
<span id="L1783"><span class="lineNum">    1783</span>              :       */</span>
<span id="L1784"><span class="lineNum">    1784</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1785"><span class="lineNum">    1785</span>              :       iterator</span>
<span id="L1786"><span class="lineNum">    1786</span>              :       insert(const_iterator __p, size_type __n, _CharT __c)</span>
<span id="L1787"><span class="lineNum">    1787</span>              :       {</span>
<span id="L1788"><span class="lineNum">    1788</span>              :         _GLIBCXX_DEBUG_PEDASSERT(__p &gt;= begin() &amp;&amp; __p &lt;= end());</span>
<span id="L1789"><span class="lineNum">    1789</span>              :         const size_type __pos = __p - begin();</span>
<span id="L1790"><span class="lineNum">    1790</span>              :         this-&gt;replace(__p, __p, __n, __c);</span>
<span id="L1791"><span class="lineNum">    1791</span>              :         return iterator(this-&gt;_M_data() + __pos);</span>
<span id="L1792"><span class="lineNum">    1792</span>              :       }</span>
<span id="L1793"><span class="lineNum">    1793</span>              : #else</span>
<span id="L1794"><span class="lineNum">    1794</span>              :       /**</span>
<span id="L1795"><span class="lineNum">    1795</span>              :        *  @brief  Insert multiple characters.</span>
<span id="L1796"><span class="lineNum">    1796</span>              :        *  @param __p  Iterator referencing location in string to insert at.</span>
<span id="L1797"><span class="lineNum">    1797</span>              :        *  @param __n  Number of characters to insert</span>
<span id="L1798"><span class="lineNum">    1798</span>              :        *  @param __c  The character to insert.</span>
<span id="L1799"><span class="lineNum">    1799</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L1800"><span class="lineNum">    1800</span>              :        *</span>
<span id="L1801"><span class="lineNum">    1801</span>              :        *  Inserts @a __n copies of character @a __c starting at the</span>
<span id="L1802"><span class="lineNum">    1802</span>              :        *  position referenced by iterator @a __p.  If adding</span>
<span id="L1803"><span class="lineNum">    1803</span>              :        *  characters causes the length to exceed max_size(),</span>
<span id="L1804"><span class="lineNum">    1804</span>              :        *  length_error is thrown.  The value of the string doesn't</span>
<span id="L1805"><span class="lineNum">    1805</span>              :        *  change if an error is thrown.</span>
<span id="L1806"><span class="lineNum">    1806</span>              :       */</span>
<span id="L1807"><span class="lineNum">    1807</span>              :       void</span>
<span id="L1808"><span class="lineNum">    1808</span>              :       insert(iterator __p, size_type __n, _CharT __c)</span>
<span id="L1809"><span class="lineNum">    1809</span>              :       { this-&gt;replace(__p, __p, __n, __c);  }</span>
<span id="L1810"><span class="lineNum">    1810</span>              : #endif</span>
<span id="L1811"><span class="lineNum">    1811</span>              : </span>
<span id="L1812"><span class="lineNum">    1812</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L1813"><span class="lineNum">    1813</span>              :       /**</span>
<span id="L1814"><span class="lineNum">    1814</span>              :        *  @brief  Insert a range of characters.</span>
<span id="L1815"><span class="lineNum">    1815</span>              :        *  @param __p  Const_iterator referencing location in string to</span>
<span id="L1816"><span class="lineNum">    1816</span>              :        *              insert at.</span>
<span id="L1817"><span class="lineNum">    1817</span>              :        *  @param __beg  Start of range.</span>
<span id="L1818"><span class="lineNum">    1818</span>              :        *  @param __end  End of range.</span>
<span id="L1819"><span class="lineNum">    1819</span>              :        *  @return  Iterator referencing the first inserted char.</span>
<span id="L1820"><span class="lineNum">    1820</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L1821"><span class="lineNum">    1821</span>              :        *</span>
<span id="L1822"><span class="lineNum">    1822</span>              :        *  Inserts characters in range [beg,end).  If adding characters</span>
<span id="L1823"><span class="lineNum">    1823</span>              :        *  causes the length to exceed max_size(), length_error is</span>
<span id="L1824"><span class="lineNum">    1824</span>              :        *  thrown.  The value of the string doesn't change if an error</span>
<span id="L1825"><span class="lineNum">    1825</span>              :        *  is thrown.</span>
<span id="L1826"><span class="lineNum">    1826</span>              :       */</span>
<span id="L1827"><span class="lineNum">    1827</span>              :       template&lt;class _InputIterator,</span>
<span id="L1828"><span class="lineNum">    1828</span>              :                typename = std::_RequireInputIter&lt;_InputIterator&gt;&gt;</span>
<span id="L1829"><span class="lineNum">    1829</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L1830"><span class="lineNum">    1830</span>              :         iterator</span>
<span id="L1831"><span class="lineNum">    1831</span>              :         insert(const_iterator __p, _InputIterator __beg, _InputIterator __end)</span>
<span id="L1832"><span class="lineNum">    1832</span>              :         {</span>
<span id="L1833"><span class="lineNum">    1833</span>              :           _GLIBCXX_DEBUG_PEDASSERT(__p &gt;= begin() &amp;&amp; __p &lt;= end());</span>
<span id="L1834"><span class="lineNum">    1834</span>              :           const size_type __pos = __p - begin();</span>
<span id="L1835"><span class="lineNum">    1835</span>              :           this-&gt;replace(__p, __p, __beg, __end);</span>
<span id="L1836"><span class="lineNum">    1836</span>              :           return iterator(this-&gt;_M_data() + __pos);</span>
<span id="L1837"><span class="lineNum">    1837</span>              :         }</span>
<span id="L1838"><span class="lineNum">    1838</span>              : #else</span>
<span id="L1839"><span class="lineNum">    1839</span>              :       /**</span>
<span id="L1840"><span class="lineNum">    1840</span>              :        *  @brief  Insert a range of characters.</span>
<span id="L1841"><span class="lineNum">    1841</span>              :        *  @param __p  Iterator referencing location in string to insert at.</span>
<span id="L1842"><span class="lineNum">    1842</span>              :        *  @param __beg  Start of range.</span>
<span id="L1843"><span class="lineNum">    1843</span>              :        *  @param __end  End of range.</span>
<span id="L1844"><span class="lineNum">    1844</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L1845"><span class="lineNum">    1845</span>              :        *</span>
<span id="L1846"><span class="lineNum">    1846</span>              :        *  Inserts characters in range [__beg,__end).  If adding</span>
<span id="L1847"><span class="lineNum">    1847</span>              :        *  characters causes the length to exceed max_size(),</span>
<span id="L1848"><span class="lineNum">    1848</span>              :        *  length_error is thrown.  The value of the string doesn't</span>
<span id="L1849"><span class="lineNum">    1849</span>              :        *  change if an error is thrown.</span>
<span id="L1850"><span class="lineNum">    1850</span>              :       */</span>
<span id="L1851"><span class="lineNum">    1851</span>              :       template&lt;class _InputIterator&gt;</span>
<span id="L1852"><span class="lineNum">    1852</span>              :         void</span>
<span id="L1853"><span class="lineNum">    1853</span>              :         insert(iterator __p, _InputIterator __beg, _InputIterator __end)</span>
<span id="L1854"><span class="lineNum">    1854</span>              :         { this-&gt;replace(__p, __p, __beg, __end); }</span>
<span id="L1855"><span class="lineNum">    1855</span>              : #endif</span>
<span id="L1856"><span class="lineNum">    1856</span>              : </span>
<span id="L1857"><span class="lineNum">    1857</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L1858"><span class="lineNum">    1858</span>              :       /**</span>
<span id="L1859"><span class="lineNum">    1859</span>              :        *  @brief  Insert an initializer_list of characters.</span>
<span id="L1860"><span class="lineNum">    1860</span>              :        *  @param __p  Iterator referencing location in string to insert at.</span>
<span id="L1861"><span class="lineNum">    1861</span>              :        *  @param __l  The initializer_list of characters to insert.</span>
<span id="L1862"><span class="lineNum">    1862</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L1863"><span class="lineNum">    1863</span>              :        */</span>
<span id="L1864"><span class="lineNum">    1864</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1865"><span class="lineNum">    1865</span>              :       iterator</span>
<span id="L1866"><span class="lineNum">    1866</span>              :       insert(const_iterator __p, initializer_list&lt;_CharT&gt; __l)</span>
<span id="L1867"><span class="lineNum">    1867</span>              :       { return this-&gt;insert(__p, __l.begin(), __l.end()); }</span>
<span id="L1868"><span class="lineNum">    1868</span>              : </span>
<span id="L1869"><span class="lineNum">    1869</span>              : #ifdef _GLIBCXX_DEFINING_STRING_INSTANTIATIONS</span>
<span id="L1870"><span class="lineNum">    1870</span>              :       // See PR libstdc++/83328</span>
<span id="L1871"><span class="lineNum">    1871</span>              :       void</span>
<span id="L1872"><span class="lineNum">    1872</span>              :       insert(iterator __p, initializer_list&lt;_CharT&gt; __l)</span>
<span id="L1873"><span class="lineNum">    1873</span>              :       {</span>
<span id="L1874"><span class="lineNum">    1874</span>              :         _GLIBCXX_DEBUG_PEDASSERT(__p &gt;= begin() &amp;&amp; __p &lt;= end());</span>
<span id="L1875"><span class="lineNum">    1875</span>              :         this-&gt;insert(__p - begin(), __l.begin(), __l.size());</span>
<span id="L1876"><span class="lineNum">    1876</span>              :       }</span>
<span id="L1877"><span class="lineNum">    1877</span>              : #endif</span>
<span id="L1878"><span class="lineNum">    1878</span>              : #endif // C++11</span>
<span id="L1879"><span class="lineNum">    1879</span>              : </span>
<span id="L1880"><span class="lineNum">    1880</span>              :       /**</span>
<span id="L1881"><span class="lineNum">    1881</span>              :        *  @brief  Insert value of a string.</span>
<span id="L1882"><span class="lineNum">    1882</span>              :        *  @param __pos1 Position in string to insert at.</span>
<span id="L1883"><span class="lineNum">    1883</span>              :        *  @param __str  The string to insert.</span>
<span id="L1884"><span class="lineNum">    1884</span>              :        *  @return  Reference to this string.</span>
<span id="L1885"><span class="lineNum">    1885</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L1886"><span class="lineNum">    1886</span>              :        *</span>
<span id="L1887"><span class="lineNum">    1887</span>              :        *  Inserts value of @a __str starting at @a __pos1.  If adding</span>
<span id="L1888"><span class="lineNum">    1888</span>              :        *  characters causes the length to exceed max_size(),</span>
<span id="L1889"><span class="lineNum">    1889</span>              :        *  length_error is thrown.  The value of the string doesn't</span>
<span id="L1890"><span class="lineNum">    1890</span>              :        *  change if an error is thrown.</span>
<span id="L1891"><span class="lineNum">    1891</span>              :       */</span>
<span id="L1892"><span class="lineNum">    1892</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1893"><span class="lineNum">    1893</span>              :       basic_string&amp;</span>
<span id="L1894"><span class="lineNum">    1894</span>              :       insert(size_type __pos1, const basic_string&amp; __str)</span>
<span id="L1895"><span class="lineNum">    1895</span>              :       { return this-&gt;replace(__pos1, size_type(0),</span>
<span id="L1896"><span class="lineNum">    1896</span>              :                              __str._M_data(), __str.size()); }</span>
<span id="L1897"><span class="lineNum">    1897</span>              : </span>
<span id="L1898"><span class="lineNum">    1898</span>              :       /**</span>
<span id="L1899"><span class="lineNum">    1899</span>              :        *  @brief  Insert a substring.</span>
<span id="L1900"><span class="lineNum">    1900</span>              :        *  @param __pos1  Position in string to insert at.</span>
<span id="L1901"><span class="lineNum">    1901</span>              :        *  @param __str   The string to insert.</span>
<span id="L1902"><span class="lineNum">    1902</span>              :        *  @param __pos2  Start of characters in str to insert.</span>
<span id="L1903"><span class="lineNum">    1903</span>              :        *  @param __n  Number of characters to insert.</span>
<span id="L1904"><span class="lineNum">    1904</span>              :        *  @return  Reference to this string.</span>
<span id="L1905"><span class="lineNum">    1905</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L1906"><span class="lineNum">    1906</span>              :        *  @throw  std::out_of_range  If @a pos1 &gt; size() or</span>
<span id="L1907"><span class="lineNum">    1907</span>              :        *  @a __pos2 &gt; @a str.size().</span>
<span id="L1908"><span class="lineNum">    1908</span>              :        *</span>
<span id="L1909"><span class="lineNum">    1909</span>              :        *  Starting at @a pos1, insert @a __n character of @a __str</span>
<span id="L1910"><span class="lineNum">    1910</span>              :        *  beginning with @a __pos2.  If adding characters causes the</span>
<span id="L1911"><span class="lineNum">    1911</span>              :        *  length to exceed max_size(), length_error is thrown.  If @a</span>
<span id="L1912"><span class="lineNum">    1912</span>              :        *  __pos1 is beyond the end of this string or @a __pos2 is</span>
<span id="L1913"><span class="lineNum">    1913</span>              :        *  beyond the end of @a __str, out_of_range is thrown.  The</span>
<span id="L1914"><span class="lineNum">    1914</span>              :        *  value of the string doesn't change if an error is thrown.</span>
<span id="L1915"><span class="lineNum">    1915</span>              :       */</span>
<span id="L1916"><span class="lineNum">    1916</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1917"><span class="lineNum">    1917</span>              :       basic_string&amp;</span>
<span id="L1918"><span class="lineNum">    1918</span>              :       insert(size_type __pos1, const basic_string&amp; __str,</span>
<span id="L1919"><span class="lineNum">    1919</span>              :              size_type __pos2, size_type __n = npos)</span>
<span id="L1920"><span class="lineNum">    1920</span>              :       { return this-&gt;replace(__pos1, size_type(0), __str._M_data()</span>
<span id="L1921"><span class="lineNum">    1921</span>              :                              + __str._M_check(__pos2, &quot;basic_string::insert&quot;),</span>
<span id="L1922"><span class="lineNum">    1922</span>              :                              __str._M_limit(__pos2, __n)); }</span>
<span id="L1923"><span class="lineNum">    1923</span>              : </span>
<span id="L1924"><span class="lineNum">    1924</span>              :       /**</span>
<span id="L1925"><span class="lineNum">    1925</span>              :        *  @brief  Insert a C substring.</span>
<span id="L1926"><span class="lineNum">    1926</span>              :        *  @param __pos  Position in string to insert at.</span>
<span id="L1927"><span class="lineNum">    1927</span>              :        *  @param __s  The C string to insert.</span>
<span id="L1928"><span class="lineNum">    1928</span>              :        *  @param __n  The number of characters to insert.</span>
<span id="L1929"><span class="lineNum">    1929</span>              :        *  @return  Reference to this string.</span>
<span id="L1930"><span class="lineNum">    1930</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L1931"><span class="lineNum">    1931</span>              :        *  @throw  std::out_of_range  If @a __pos is beyond the end of this</span>
<span id="L1932"><span class="lineNum">    1932</span>              :        *  string.</span>
<span id="L1933"><span class="lineNum">    1933</span>              :        *</span>
<span id="L1934"><span class="lineNum">    1934</span>              :        *  Inserts the first @a __n characters of @a __s starting at @a</span>
<span id="L1935"><span class="lineNum">    1935</span>              :        *  __pos.  If adding characters causes the length to exceed</span>
<span id="L1936"><span class="lineNum">    1936</span>              :        *  max_size(), length_error is thrown.  If @a __pos is beyond</span>
<span id="L1937"><span class="lineNum">    1937</span>              :        *  end(), out_of_range is thrown.  The value of the string</span>
<span id="L1938"><span class="lineNum">    1938</span>              :        *  doesn't change if an error is thrown.</span>
<span id="L1939"><span class="lineNum">    1939</span>              :       */</span>
<span id="L1940"><span class="lineNum">    1940</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1941"><span class="lineNum">    1941</span>              :       basic_string&amp;</span>
<span id="L1942"><span class="lineNum">    1942</span>              :       insert(size_type __pos, const _CharT* __s, size_type __n)</span>
<span id="L1943"><span class="lineNum">    1943</span>              :       { return this-&gt;replace(__pos, size_type(0), __s, __n); }</span>
<span id="L1944"><span class="lineNum">    1944</span>              : </span>
<span id="L1945"><span class="lineNum">    1945</span>              :       /**</span>
<span id="L1946"><span class="lineNum">    1946</span>              :        *  @brief  Insert a C string.</span>
<span id="L1947"><span class="lineNum">    1947</span>              :        *  @param __pos  Position in string to insert at.</span>
<span id="L1948"><span class="lineNum">    1948</span>              :        *  @param __s  The C string to insert.</span>
<span id="L1949"><span class="lineNum">    1949</span>              :        *  @return  Reference to this string.</span>
<span id="L1950"><span class="lineNum">    1950</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L1951"><span class="lineNum">    1951</span>              :        *  @throw  std::out_of_range  If @a pos is beyond the end of this</span>
<span id="L1952"><span class="lineNum">    1952</span>              :        *  string.</span>
<span id="L1953"><span class="lineNum">    1953</span>              :        *</span>
<span id="L1954"><span class="lineNum">    1954</span>              :        *  Inserts the first @a n characters of @a __s starting at @a __pos.  If</span>
<span id="L1955"><span class="lineNum">    1955</span>              :        *  adding characters causes the length to exceed max_size(),</span>
<span id="L1956"><span class="lineNum">    1956</span>              :        *  length_error is thrown.  If @a __pos is beyond end(), out_of_range is</span>
<span id="L1957"><span class="lineNum">    1957</span>              :        *  thrown.  The value of the string doesn't change if an error is</span>
<span id="L1958"><span class="lineNum">    1958</span>              :        *  thrown.</span>
<span id="L1959"><span class="lineNum">    1959</span>              :       */</span>
<span id="L1960"><span class="lineNum">    1960</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1961"><span class="lineNum">    1961</span>              :       basic_string&amp;</span>
<span id="L1962"><span class="lineNum">    1962</span>              :       insert(size_type __pos, const _CharT* __s)</span>
<span id="L1963"><span class="lineNum">    1963</span>              :       {</span>
<span id="L1964"><span class="lineNum">    1964</span>              :         __glibcxx_requires_string(__s);</span>
<span id="L1965"><span class="lineNum">    1965</span>              :         return this-&gt;replace(__pos, size_type(0), __s,</span>
<span id="L1966"><span class="lineNum">    1966</span>              :                              traits_type::length(__s));</span>
<span id="L1967"><span class="lineNum">    1967</span>              :       }</span>
<span id="L1968"><span class="lineNum">    1968</span>              : </span>
<span id="L1969"><span class="lineNum">    1969</span>              :       /**</span>
<span id="L1970"><span class="lineNum">    1970</span>              :        *  @brief  Insert multiple characters.</span>
<span id="L1971"><span class="lineNum">    1971</span>              :        *  @param __pos  Index in string to insert at.</span>
<span id="L1972"><span class="lineNum">    1972</span>              :        *  @param __n  Number of characters to insert</span>
<span id="L1973"><span class="lineNum">    1973</span>              :        *  @param __c  The character to insert.</span>
<span id="L1974"><span class="lineNum">    1974</span>              :        *  @return  Reference to this string.</span>
<span id="L1975"><span class="lineNum">    1975</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L1976"><span class="lineNum">    1976</span>              :        *  @throw  std::out_of_range  If @a __pos is beyond the end of this</span>
<span id="L1977"><span class="lineNum">    1977</span>              :        *  string.</span>
<span id="L1978"><span class="lineNum">    1978</span>              :        *</span>
<span id="L1979"><span class="lineNum">    1979</span>              :        *  Inserts @a __n copies of character @a __c starting at index</span>
<span id="L1980"><span class="lineNum">    1980</span>              :        *  @a __pos.  If adding characters causes the length to exceed</span>
<span id="L1981"><span class="lineNum">    1981</span>              :        *  max_size(), length_error is thrown.  If @a __pos &gt; length(),</span>
<span id="L1982"><span class="lineNum">    1982</span>              :        *  out_of_range is thrown.  The value of the string doesn't</span>
<span id="L1983"><span class="lineNum">    1983</span>              :        *  change if an error is thrown.</span>
<span id="L1984"><span class="lineNum">    1984</span>              :       */</span>
<span id="L1985"><span class="lineNum">    1985</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L1986"><span class="lineNum">    1986</span>              :       basic_string&amp;</span>
<span id="L1987"><span class="lineNum">    1987</span>              :       insert(size_type __pos, size_type __n, _CharT __c)</span>
<span id="L1988"><span class="lineNum">    1988</span>              :       { return _M_replace_aux(_M_check(__pos, &quot;basic_string::insert&quot;),</span>
<span id="L1989"><span class="lineNum">    1989</span>              :                               size_type(0), __n, __c); }</span>
<span id="L1990"><span class="lineNum">    1990</span>              : </span>
<span id="L1991"><span class="lineNum">    1991</span>              :       /**</span>
<span id="L1992"><span class="lineNum">    1992</span>              :        *  @brief  Insert one character.</span>
<span id="L1993"><span class="lineNum">    1993</span>              :        *  @param __p  Iterator referencing position in string to insert at.</span>
<span id="L1994"><span class="lineNum">    1994</span>              :        *  @param __c  The character to insert.</span>
<span id="L1995"><span class="lineNum">    1995</span>              :        *  @return  Iterator referencing newly inserted char.</span>
<span id="L1996"><span class="lineNum">    1996</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L1997"><span class="lineNum">    1997</span>              :        *</span>
<span id="L1998"><span class="lineNum">    1998</span>              :        *  Inserts character @a __c at position referenced by @a __p.</span>
<span id="L1999"><span class="lineNum">    1999</span>              :        *  If adding character causes the length to exceed max_size(),</span>
<span id="L2000"><span class="lineNum">    2000</span>              :        *  length_error is thrown.  If @a __p is beyond end of string,</span>
<span id="L2001"><span class="lineNum">    2001</span>              :        *  out_of_range is thrown.  The value of the string doesn't</span>
<span id="L2002"><span class="lineNum">    2002</span>              :        *  change if an error is thrown.</span>
<span id="L2003"><span class="lineNum">    2003</span>              :       */</span>
<span id="L2004"><span class="lineNum">    2004</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2005"><span class="lineNum">    2005</span>              :       iterator</span>
<span id="L2006"><span class="lineNum">    2006</span>              :       insert(__const_iterator __p, _CharT __c)</span>
<span id="L2007"><span class="lineNum">    2007</span>              :       {</span>
<span id="L2008"><span class="lineNum">    2008</span>              :         _GLIBCXX_DEBUG_PEDASSERT(__p &gt;= begin() &amp;&amp; __p &lt;= end());</span>
<span id="L2009"><span class="lineNum">    2009</span>              :         const size_type __pos = __p - begin();</span>
<span id="L2010"><span class="lineNum">    2010</span>              :         _M_replace_aux(__pos, size_type(0), size_type(1), __c);</span>
<span id="L2011"><span class="lineNum">    2011</span>              :         return iterator(_M_data() + __pos);</span>
<span id="L2012"><span class="lineNum">    2012</span>              :       }</span>
<span id="L2013"><span class="lineNum">    2013</span>              : </span>
<span id="L2014"><span class="lineNum">    2014</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L2015"><span class="lineNum">    2015</span>              :       /**</span>
<span id="L2016"><span class="lineNum">    2016</span>              :        *  @brief  Insert a string_view.</span>
<span id="L2017"><span class="lineNum">    2017</span>              :        *  @param __pos  Position in string to insert at.</span>
<span id="L2018"><span class="lineNum">    2018</span>              :        *  @param __svt  The object convertible to string_view to insert.</span>
<span id="L2019"><span class="lineNum">    2019</span>              :        *  @return  Reference to this string.</span>
<span id="L2020"><span class="lineNum">    2020</span>              :       */</span>
<span id="L2021"><span class="lineNum">    2021</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L2022"><span class="lineNum">    2022</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L2023"><span class="lineNum">    2023</span>              :         _If_sv&lt;_Tp, basic_string&amp;&gt;</span>
<span id="L2024"><span class="lineNum">    2024</span>              :         insert(size_type __pos, const _Tp&amp; __svt)</span>
<span id="L2025"><span class="lineNum">    2025</span>              :         {</span>
<span id="L2026"><span class="lineNum">    2026</span>              :           __sv_type __sv = __svt;</span>
<span id="L2027"><span class="lineNum">    2027</span>              :           return this-&gt;insert(__pos, __sv.data(), __sv.size());</span>
<span id="L2028"><span class="lineNum">    2028</span>              :         }</span>
<span id="L2029"><span class="lineNum">    2029</span>              : </span>
<span id="L2030"><span class="lineNum">    2030</span>              :       /**</span>
<span id="L2031"><span class="lineNum">    2031</span>              :        *  @brief  Insert a string_view.</span>
<span id="L2032"><span class="lineNum">    2032</span>              :        *  @param __pos1  Position in string to insert at.</span>
<span id="L2033"><span class="lineNum">    2033</span>              :        *  @param __svt   The object convertible to string_view to insert from.</span>
<span id="L2034"><span class="lineNum">    2034</span>              :        *  @param __pos2  Start of characters in str to insert.</span>
<span id="L2035"><span class="lineNum">    2035</span>              :        *  @param __n    The number of characters to insert.</span>
<span id="L2036"><span class="lineNum">    2036</span>              :        *  @return  Reference to this string.</span>
<span id="L2037"><span class="lineNum">    2037</span>              :       */</span>
<span id="L2038"><span class="lineNum">    2038</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L2039"><span class="lineNum">    2039</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L2040"><span class="lineNum">    2040</span>              :         _If_sv&lt;_Tp, basic_string&amp;&gt;</span>
<span id="L2041"><span class="lineNum">    2041</span>              :         insert(size_type __pos1, const _Tp&amp; __svt,</span>
<span id="L2042"><span class="lineNum">    2042</span>              :                size_type __pos2, size_type __n = npos)</span>
<span id="L2043"><span class="lineNum">    2043</span>              :         {</span>
<span id="L2044"><span class="lineNum">    2044</span>              :           __sv_type __sv = __svt;</span>
<span id="L2045"><span class="lineNum">    2045</span>              :           return this-&gt;replace(__pos1, size_type(0),</span>
<span id="L2046"><span class="lineNum">    2046</span>              :               __sv.data()</span>
<span id="L2047"><span class="lineNum">    2047</span>              :               + std::__sv_check(__sv.size(), __pos2, &quot;basic_string::insert&quot;),</span>
<span id="L2048"><span class="lineNum">    2048</span>              :               std::__sv_limit(__sv.size(), __pos2, __n));</span>
<span id="L2049"><span class="lineNum">    2049</span>              :         }</span>
<span id="L2050"><span class="lineNum">    2050</span>              : #endif // C++17</span>
<span id="L2051"><span class="lineNum">    2051</span>              : </span>
<span id="L2052"><span class="lineNum">    2052</span>              :       /**</span>
<span id="L2053"><span class="lineNum">    2053</span>              :        *  @brief  Remove characters.</span>
<span id="L2054"><span class="lineNum">    2054</span>              :        *  @param __pos  Index of first character to remove (default 0).</span>
<span id="L2055"><span class="lineNum">    2055</span>              :        *  @param __n  Number of characters to remove (default remainder).</span>
<span id="L2056"><span class="lineNum">    2056</span>              :        *  @return  Reference to this string.</span>
<span id="L2057"><span class="lineNum">    2057</span>              :        *  @throw  std::out_of_range  If @a pos is beyond the end of this</span>
<span id="L2058"><span class="lineNum">    2058</span>              :        *  string.</span>
<span id="L2059"><span class="lineNum">    2059</span>              :        *</span>
<span id="L2060"><span class="lineNum">    2060</span>              :        *  Removes @a __n characters from this string starting at @a</span>
<span id="L2061"><span class="lineNum">    2061</span>              :        *  __pos.  The length of the string is reduced by @a __n.  If</span>
<span id="L2062"><span class="lineNum">    2062</span>              :        *  there are &lt; @a __n characters to remove, the remainder of</span>
<span id="L2063"><span class="lineNum">    2063</span>              :        *  the string is truncated.  If @a __p is beyond end of string,</span>
<span id="L2064"><span class="lineNum">    2064</span>              :        *  out_of_range is thrown.  The value of the string doesn't</span>
<span id="L2065"><span class="lineNum">    2065</span>              :        *  change if an error is thrown.</span>
<span id="L2066"><span class="lineNum">    2066</span>              :       */</span>
<span id="L2067"><span class="lineNum">    2067</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2068"><span class="lineNum">    2068</span>              :       basic_string&amp;</span>
<span id="L2069"><span class="lineNum">    2069</span>              :       erase(size_type __pos = 0, size_type __n = npos)</span>
<span id="L2070"><span class="lineNum">    2070</span>              :       {</span>
<span id="L2071"><span class="lineNum">    2071</span>              :         _M_check(__pos, &quot;basic_string::erase&quot;);</span>
<span id="L2072"><span class="lineNum">    2072</span>              :         if (__n == npos)</span>
<span id="L2073"><span class="lineNum">    2073</span>              :           this-&gt;_M_set_length(__pos);</span>
<span id="L2074"><span class="lineNum">    2074</span>              :         else if (__n != 0)</span>
<span id="L2075"><span class="lineNum">    2075</span>              :           this-&gt;_M_erase(__pos, _M_limit(__pos, __n));</span>
<span id="L2076"><span class="lineNum">    2076</span>              :         return *this;</span>
<span id="L2077"><span class="lineNum">    2077</span>              :       }</span>
<span id="L2078"><span class="lineNum">    2078</span>              : </span>
<span id="L2079"><span class="lineNum">    2079</span>              :       /**</span>
<span id="L2080"><span class="lineNum">    2080</span>              :        *  @brief  Remove one character.</span>
<span id="L2081"><span class="lineNum">    2081</span>              :        *  @param __position  Iterator referencing the character to remove.</span>
<span id="L2082"><span class="lineNum">    2082</span>              :        *  @return  iterator referencing same location after removal.</span>
<span id="L2083"><span class="lineNum">    2083</span>              :        *</span>
<span id="L2084"><span class="lineNum">    2084</span>              :        *  Removes the character at @a __position from this string. The value</span>
<span id="L2085"><span class="lineNum">    2085</span>              :        *  of the string doesn't change if an error is thrown.</span>
<span id="L2086"><span class="lineNum">    2086</span>              :       */</span>
<span id="L2087"><span class="lineNum">    2087</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2088"><span class="lineNum">    2088</span>              :       iterator</span>
<span id="L2089"><span class="lineNum">    2089</span>              :       erase(__const_iterator __position)</span>
<span id="L2090"><span class="lineNum">    2090</span>              :       {</span>
<span id="L2091"><span class="lineNum">    2091</span>              :         _GLIBCXX_DEBUG_PEDASSERT(__position &gt;= begin()</span>
<span id="L2092"><span class="lineNum">    2092</span>              :                                  &amp;&amp; __position &lt; end());</span>
<span id="L2093"><span class="lineNum">    2093</span>              :         const size_type __pos = __position - begin();</span>
<span id="L2094"><span class="lineNum">    2094</span>              :         this-&gt;_M_erase(__pos, size_type(1));</span>
<span id="L2095"><span class="lineNum">    2095</span>              :         return iterator(_M_data() + __pos);</span>
<span id="L2096"><span class="lineNum">    2096</span>              :       }</span>
<span id="L2097"><span class="lineNum">    2097</span>              : </span>
<span id="L2098"><span class="lineNum">    2098</span>              :       /**</span>
<span id="L2099"><span class="lineNum">    2099</span>              :        *  @brief  Remove a range of characters.</span>
<span id="L2100"><span class="lineNum">    2100</span>              :        *  @param __first  Iterator referencing the first character to remove.</span>
<span id="L2101"><span class="lineNum">    2101</span>              :        *  @param __last  Iterator referencing the end of the range.</span>
<span id="L2102"><span class="lineNum">    2102</span>              :        *  @return  Iterator referencing location of first after removal.</span>
<span id="L2103"><span class="lineNum">    2103</span>              :        *</span>
<span id="L2104"><span class="lineNum">    2104</span>              :        *  Removes the characters in the range [first,last) from this string.</span>
<span id="L2105"><span class="lineNum">    2105</span>              :        *  The value of the string doesn't change if an error is thrown.</span>
<span id="L2106"><span class="lineNum">    2106</span>              :       */</span>
<span id="L2107"><span class="lineNum">    2107</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2108"><span class="lineNum">    2108</span>              :       iterator</span>
<span id="L2109"><span class="lineNum">    2109</span>              :       erase(__const_iterator __first, __const_iterator __last)</span>
<span id="L2110"><span class="lineNum">    2110</span>              :       {</span>
<span id="L2111"><span class="lineNum">    2111</span>              :         _GLIBCXX_DEBUG_PEDASSERT(__first &gt;= begin() &amp;&amp; __first &lt;= __last</span>
<span id="L2112"><span class="lineNum">    2112</span>              :                                  &amp;&amp; __last &lt;= end());</span>
<span id="L2113"><span class="lineNum">    2113</span>              :         const size_type __pos = __first - begin();</span>
<span id="L2114"><span class="lineNum">    2114</span>              :         if (__last == end())</span>
<span id="L2115"><span class="lineNum">    2115</span>              :           this-&gt;_M_set_length(__pos);</span>
<span id="L2116"><span class="lineNum">    2116</span>              :         else</span>
<span id="L2117"><span class="lineNum">    2117</span>              :           this-&gt;_M_erase(__pos, __last - __first);</span>
<span id="L2118"><span class="lineNum">    2118</span>              :         return iterator(this-&gt;_M_data() + __pos);</span>
<span id="L2119"><span class="lineNum">    2119</span>              :       }</span>
<span id="L2120"><span class="lineNum">    2120</span>              : </span>
<span id="L2121"><span class="lineNum">    2121</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L2122"><span class="lineNum">    2122</span>              :       /**</span>
<span id="L2123"><span class="lineNum">    2123</span>              :        *  @brief  Remove the last character.</span>
<span id="L2124"><span class="lineNum">    2124</span>              :        *</span>
<span id="L2125"><span class="lineNum">    2125</span>              :        *  The string must be non-empty.</span>
<span id="L2126"><span class="lineNum">    2126</span>              :        */</span>
<span id="L2127"><span class="lineNum">    2127</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2128"><span class="lineNum">    2128</span>              :       void</span>
<span id="L2129"><span class="lineNum">    2129</span>              :       pop_back() noexcept</span>
<span id="L2130"><span class="lineNum">    2130</span>              :       {</span>
<span id="L2131"><span class="lineNum">    2131</span>              :         __glibcxx_assert(!empty());</span>
<span id="L2132"><span class="lineNum">    2132</span>              :         _M_erase(size() - 1, 1);</span>
<span id="L2133"><span class="lineNum">    2133</span>              :       }</span>
<span id="L2134"><span class="lineNum">    2134</span>              : #endif // C++11</span>
<span id="L2135"><span class="lineNum">    2135</span>              : </span>
<span id="L2136"><span class="lineNum">    2136</span>              :       /**</span>
<span id="L2137"><span class="lineNum">    2137</span>              :        *  @brief  Replace characters with value from another string.</span>
<span id="L2138"><span class="lineNum">    2138</span>              :        *  @param __pos  Index of first character to replace.</span>
<span id="L2139"><span class="lineNum">    2139</span>              :        *  @param __n  Number of characters to be replaced.</span>
<span id="L2140"><span class="lineNum">    2140</span>              :        *  @param __str  String to insert.</span>
<span id="L2141"><span class="lineNum">    2141</span>              :        *  @return  Reference to this string.</span>
<span id="L2142"><span class="lineNum">    2142</span>              :        *  @throw  std::out_of_range  If @a pos is beyond the end of this</span>
<span id="L2143"><span class="lineNum">    2143</span>              :        *  string.</span>
<span id="L2144"><span class="lineNum">    2144</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L2145"><span class="lineNum">    2145</span>              :        *</span>
<span id="L2146"><span class="lineNum">    2146</span>              :        *  Removes the characters in the range [__pos,__pos+__n) from</span>
<span id="L2147"><span class="lineNum">    2147</span>              :        *  this string.  In place, the value of @a __str is inserted.</span>
<span id="L2148"><span class="lineNum">    2148</span>              :        *  If @a __pos is beyond end of string, out_of_range is thrown.</span>
<span id="L2149"><span class="lineNum">    2149</span>              :        *  If the length of the result exceeds max_size(), length_error</span>
<span id="L2150"><span class="lineNum">    2150</span>              :        *  is thrown.  The value of the string doesn't change if an</span>
<span id="L2151"><span class="lineNum">    2151</span>              :        *  error is thrown.</span>
<span id="L2152"><span class="lineNum">    2152</span>              :       */</span>
<span id="L2153"><span class="lineNum">    2153</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2154"><span class="lineNum">    2154</span>              :       basic_string&amp;</span>
<span id="L2155"><span class="lineNum">    2155</span>              :       replace(size_type __pos, size_type __n, const basic_string&amp; __str)</span>
<span id="L2156"><span class="lineNum">    2156</span>              :       { return this-&gt;replace(__pos, __n, __str._M_data(), __str.size()); }</span>
<span id="L2157"><span class="lineNum">    2157</span>              : </span>
<span id="L2158"><span class="lineNum">    2158</span>              :       /**</span>
<span id="L2159"><span class="lineNum">    2159</span>              :        *  @brief  Replace characters with value from another string.</span>
<span id="L2160"><span class="lineNum">    2160</span>              :        *  @param __pos1  Index of first character to replace.</span>
<span id="L2161"><span class="lineNum">    2161</span>              :        *  @param __n1  Number of characters to be replaced.</span>
<span id="L2162"><span class="lineNum">    2162</span>              :        *  @param __str  String to insert.</span>
<span id="L2163"><span class="lineNum">    2163</span>              :        *  @param __pos2  Index of first character of str to use.</span>
<span id="L2164"><span class="lineNum">    2164</span>              :        *  @param __n2  Number of characters from str to use.</span>
<span id="L2165"><span class="lineNum">    2165</span>              :        *  @return  Reference to this string.</span>
<span id="L2166"><span class="lineNum">    2166</span>              :        *  @throw  std::out_of_range  If @a __pos1 &gt; size() or @a __pos2 &gt;</span>
<span id="L2167"><span class="lineNum">    2167</span>              :        *  __str.size().</span>
<span id="L2168"><span class="lineNum">    2168</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L2169"><span class="lineNum">    2169</span>              :        *</span>
<span id="L2170"><span class="lineNum">    2170</span>              :        *  Removes the characters in the range [__pos1,__pos1 + n) from this</span>
<span id="L2171"><span class="lineNum">    2171</span>              :        *  string.  In place, the value of @a __str is inserted.  If @a __pos is</span>
<span id="L2172"><span class="lineNum">    2172</span>              :        *  beyond end of string, out_of_range is thrown.  If the length of the</span>
<span id="L2173"><span class="lineNum">    2173</span>              :        *  result exceeds max_size(), length_error is thrown.  The value of the</span>
<span id="L2174"><span class="lineNum">    2174</span>              :        *  string doesn't change if an error is thrown.</span>
<span id="L2175"><span class="lineNum">    2175</span>              :       */</span>
<span id="L2176"><span class="lineNum">    2176</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2177"><span class="lineNum">    2177</span>              :       basic_string&amp;</span>
<span id="L2178"><span class="lineNum">    2178</span>              :       replace(size_type __pos1, size_type __n1, const basic_string&amp; __str,</span>
<span id="L2179"><span class="lineNum">    2179</span>              :               size_type __pos2, size_type __n2 = npos)</span>
<span id="L2180"><span class="lineNum">    2180</span>              :       { return this-&gt;replace(__pos1, __n1, __str._M_data()</span>
<span id="L2181"><span class="lineNum">    2181</span>              :                              + __str._M_check(__pos2, &quot;basic_string::replace&quot;),</span>
<span id="L2182"><span class="lineNum">    2182</span>              :                              __str._M_limit(__pos2, __n2)); }</span>
<span id="L2183"><span class="lineNum">    2183</span>              : </span>
<span id="L2184"><span class="lineNum">    2184</span>              :       /**</span>
<span id="L2185"><span class="lineNum">    2185</span>              :        *  @brief  Replace characters with value of a C substring.</span>
<span id="L2186"><span class="lineNum">    2186</span>              :        *  @param __pos  Index of first character to replace.</span>
<span id="L2187"><span class="lineNum">    2187</span>              :        *  @param __n1  Number of characters to be replaced.</span>
<span id="L2188"><span class="lineNum">    2188</span>              :        *  @param __s  C string to insert.</span>
<span id="L2189"><span class="lineNum">    2189</span>              :        *  @param __n2  Number of characters from @a s to use.</span>
<span id="L2190"><span class="lineNum">    2190</span>              :        *  @return  Reference to this string.</span>
<span id="L2191"><span class="lineNum">    2191</span>              :        *  @throw  std::out_of_range  If @a pos1 &gt; size().</span>
<span id="L2192"><span class="lineNum">    2192</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L2193"><span class="lineNum">    2193</span>              :        *</span>
<span id="L2194"><span class="lineNum">    2194</span>              :        *  Removes the characters in the range [__pos,__pos + __n1)</span>
<span id="L2195"><span class="lineNum">    2195</span>              :        *  from this string.  In place, the first @a __n2 characters of</span>
<span id="L2196"><span class="lineNum">    2196</span>              :        *  @a __s are inserted, or all of @a __s if @a __n2 is too large.  If</span>
<span id="L2197"><span class="lineNum">    2197</span>              :        *  @a __pos is beyond end of string, out_of_range is thrown.  If</span>
<span id="L2198"><span class="lineNum">    2198</span>              :        *  the length of result exceeds max_size(), length_error is</span>
<span id="L2199"><span class="lineNum">    2199</span>              :        *  thrown.  The value of the string doesn't change if an error</span>
<span id="L2200"><span class="lineNum">    2200</span>              :        *  is thrown.</span>
<span id="L2201"><span class="lineNum">    2201</span>              :       */</span>
<span id="L2202"><span class="lineNum">    2202</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2203"><span class="lineNum">    2203</span>              :       basic_string&amp;</span>
<span id="L2204"><span class="lineNum">    2204</span>              :       replace(size_type __pos, size_type __n1, const _CharT* __s,</span>
<span id="L2205"><span class="lineNum">    2205</span>              :               size_type __n2)</span>
<span id="L2206"><span class="lineNum">    2206</span>              :       {</span>
<span id="L2207"><span class="lineNum">    2207</span>              :         __glibcxx_requires_string_len(__s, __n2);</span>
<span id="L2208"><span class="lineNum">    2208</span>              :         return _M_replace(_M_check(__pos, &quot;basic_string::replace&quot;),</span>
<span id="L2209"><span class="lineNum">    2209</span>              :                           _M_limit(__pos, __n1), __s, __n2);</span>
<span id="L2210"><span class="lineNum">    2210</span>              :       }</span>
<span id="L2211"><span class="lineNum">    2211</span>              : </span>
<span id="L2212"><span class="lineNum">    2212</span>              :       /**</span>
<span id="L2213"><span class="lineNum">    2213</span>              :        *  @brief  Replace characters with value of a C string.</span>
<span id="L2214"><span class="lineNum">    2214</span>              :        *  @param __pos  Index of first character to replace.</span>
<span id="L2215"><span class="lineNum">    2215</span>              :        *  @param __n1  Number of characters to be replaced.</span>
<span id="L2216"><span class="lineNum">    2216</span>              :        *  @param __s  C string to insert.</span>
<span id="L2217"><span class="lineNum">    2217</span>              :        *  @return  Reference to this string.</span>
<span id="L2218"><span class="lineNum">    2218</span>              :        *  @throw  std::out_of_range  If @a pos &gt; size().</span>
<span id="L2219"><span class="lineNum">    2219</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L2220"><span class="lineNum">    2220</span>              :        *</span>
<span id="L2221"><span class="lineNum">    2221</span>              :        *  Removes the characters in the range [__pos,__pos + __n1)</span>
<span id="L2222"><span class="lineNum">    2222</span>              :        *  from this string.  In place, the characters of @a __s are</span>
<span id="L2223"><span class="lineNum">    2223</span>              :        *  inserted.  If @a __pos is beyond end of string, out_of_range</span>
<span id="L2224"><span class="lineNum">    2224</span>              :        *  is thrown.  If the length of result exceeds max_size(),</span>
<span id="L2225"><span class="lineNum">    2225</span>              :        *  length_error is thrown.  The value of the string doesn't</span>
<span id="L2226"><span class="lineNum">    2226</span>              :        *  change if an error is thrown.</span>
<span id="L2227"><span class="lineNum">    2227</span>              :       */</span>
<span id="L2228"><span class="lineNum">    2228</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2229"><span class="lineNum">    2229</span>              :       basic_string&amp;</span>
<span id="L2230"><span class="lineNum">    2230</span>              :       replace(size_type __pos, size_type __n1, const _CharT* __s)</span>
<span id="L2231"><span class="lineNum">    2231</span>              :       {</span>
<span id="L2232"><span class="lineNum">    2232</span>              :         __glibcxx_requires_string(__s);</span>
<span id="L2233"><span class="lineNum">    2233</span>              :         return this-&gt;replace(__pos, __n1, __s, traits_type::length(__s));</span>
<span id="L2234"><span class="lineNum">    2234</span>              :       }</span>
<span id="L2235"><span class="lineNum">    2235</span>              : </span>
<span id="L2236"><span class="lineNum">    2236</span>              :       /**</span>
<span id="L2237"><span class="lineNum">    2237</span>              :        *  @brief  Replace characters with multiple characters.</span>
<span id="L2238"><span class="lineNum">    2238</span>              :        *  @param __pos  Index of first character to replace.</span>
<span id="L2239"><span class="lineNum">    2239</span>              :        *  @param __n1  Number of characters to be replaced.</span>
<span id="L2240"><span class="lineNum">    2240</span>              :        *  @param __n2  Number of characters to insert.</span>
<span id="L2241"><span class="lineNum">    2241</span>              :        *  @param __c  Character to insert.</span>
<span id="L2242"><span class="lineNum">    2242</span>              :        *  @return  Reference to this string.</span>
<span id="L2243"><span class="lineNum">    2243</span>              :        *  @throw  std::out_of_range  If @a __pos &gt; size().</span>
<span id="L2244"><span class="lineNum">    2244</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L2245"><span class="lineNum">    2245</span>              :        *</span>
<span id="L2246"><span class="lineNum">    2246</span>              :        *  Removes the characters in the range [pos,pos + n1) from this</span>
<span id="L2247"><span class="lineNum">    2247</span>              :        *  string.  In place, @a __n2 copies of @a __c are inserted.</span>
<span id="L2248"><span class="lineNum">    2248</span>              :        *  If @a __pos is beyond end of string, out_of_range is thrown.</span>
<span id="L2249"><span class="lineNum">    2249</span>              :        *  If the length of result exceeds max_size(), length_error is</span>
<span id="L2250"><span class="lineNum">    2250</span>              :        *  thrown.  The value of the string doesn't change if an error</span>
<span id="L2251"><span class="lineNum">    2251</span>              :        *  is thrown.</span>
<span id="L2252"><span class="lineNum">    2252</span>              :       */</span>
<span id="L2253"><span class="lineNum">    2253</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2254"><span class="lineNum">    2254</span>              :       basic_string&amp;</span>
<span id="L2255"><span class="lineNum">    2255</span>              :       replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)</span>
<span id="L2256"><span class="lineNum">    2256</span>              :       { return _M_replace_aux(_M_check(__pos, &quot;basic_string::replace&quot;),</span>
<span id="L2257"><span class="lineNum">    2257</span>              :                               _M_limit(__pos, __n1), __n2, __c); }</span>
<span id="L2258"><span class="lineNum">    2258</span>              : </span>
<span id="L2259"><span class="lineNum">    2259</span>              :       /**</span>
<span id="L2260"><span class="lineNum">    2260</span>              :        *  @brief  Replace range of characters with string.</span>
<span id="L2261"><span class="lineNum">    2261</span>              :        *  @param __i1  Iterator referencing start of range to replace.</span>
<span id="L2262"><span class="lineNum">    2262</span>              :        *  @param __i2  Iterator referencing end of range to replace.</span>
<span id="L2263"><span class="lineNum">    2263</span>              :        *  @param __str  String value to insert.</span>
<span id="L2264"><span class="lineNum">    2264</span>              :        *  @return  Reference to this string.</span>
<span id="L2265"><span class="lineNum">    2265</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L2266"><span class="lineNum">    2266</span>              :        *</span>
<span id="L2267"><span class="lineNum">    2267</span>              :        *  Removes the characters in the range [__i1,__i2).  In place,</span>
<span id="L2268"><span class="lineNum">    2268</span>              :        *  the value of @a __str is inserted.  If the length of result</span>
<span id="L2269"><span class="lineNum">    2269</span>              :        *  exceeds max_size(), length_error is thrown.  The value of</span>
<span id="L2270"><span class="lineNum">    2270</span>              :        *  the string doesn't change if an error is thrown.</span>
<span id="L2271"><span class="lineNum">    2271</span>              :       */</span>
<span id="L2272"><span class="lineNum">    2272</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2273"><span class="lineNum">    2273</span>              :       basic_string&amp;</span>
<span id="L2274"><span class="lineNum">    2274</span>              :       replace(__const_iterator __i1, __const_iterator __i2,</span>
<span id="L2275"><span class="lineNum">    2275</span>              :               const basic_string&amp; __str)</span>
<span id="L2276"><span class="lineNum">    2276</span>              :       { return this-&gt;replace(__i1, __i2, __str._M_data(), __str.size()); }</span>
<span id="L2277"><span class="lineNum">    2277</span>              : </span>
<span id="L2278"><span class="lineNum">    2278</span>              :       /**</span>
<span id="L2279"><span class="lineNum">    2279</span>              :        *  @brief  Replace range of characters with C substring.</span>
<span id="L2280"><span class="lineNum">    2280</span>              :        *  @param __i1  Iterator referencing start of range to replace.</span>
<span id="L2281"><span class="lineNum">    2281</span>              :        *  @param __i2  Iterator referencing end of range to replace.</span>
<span id="L2282"><span class="lineNum">    2282</span>              :        *  @param __s  C string value to insert.</span>
<span id="L2283"><span class="lineNum">    2283</span>              :        *  @param __n  Number of characters from s to insert.</span>
<span id="L2284"><span class="lineNum">    2284</span>              :        *  @return  Reference to this string.</span>
<span id="L2285"><span class="lineNum">    2285</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L2286"><span class="lineNum">    2286</span>              :        *</span>
<span id="L2287"><span class="lineNum">    2287</span>              :        *  Removes the characters in the range [__i1,__i2).  In place,</span>
<span id="L2288"><span class="lineNum">    2288</span>              :        *  the first @a __n characters of @a __s are inserted.  If the</span>
<span id="L2289"><span class="lineNum">    2289</span>              :        *  length of result exceeds max_size(), length_error is thrown.</span>
<span id="L2290"><span class="lineNum">    2290</span>              :        *  The value of the string doesn't change if an error is</span>
<span id="L2291"><span class="lineNum">    2291</span>              :        *  thrown.</span>
<span id="L2292"><span class="lineNum">    2292</span>              :       */</span>
<span id="L2293"><span class="lineNum">    2293</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2294"><span class="lineNum">    2294</span>              :       basic_string&amp;</span>
<span id="L2295"><span class="lineNum">    2295</span>              :       replace(__const_iterator __i1, __const_iterator __i2,</span>
<span id="L2296"><span class="lineNum">    2296</span>              :               const _CharT* __s, size_type __n)</span>
<span id="L2297"><span class="lineNum">    2297</span>              :       {</span>
<span id="L2298"><span class="lineNum">    2298</span>              :         _GLIBCXX_DEBUG_PEDASSERT(begin() &lt;= __i1 &amp;&amp; __i1 &lt;= __i2</span>
<span id="L2299"><span class="lineNum">    2299</span>              :                                  &amp;&amp; __i2 &lt;= end());</span>
<span id="L2300"><span class="lineNum">    2300</span>              :         return this-&gt;replace(__i1 - begin(), __i2 - __i1, __s, __n);</span>
<span id="L2301"><span class="lineNum">    2301</span>              :       }</span>
<span id="L2302"><span class="lineNum">    2302</span>              : </span>
<span id="L2303"><span class="lineNum">    2303</span>              :       /**</span>
<span id="L2304"><span class="lineNum">    2304</span>              :        *  @brief  Replace range of characters with C string.</span>
<span id="L2305"><span class="lineNum">    2305</span>              :        *  @param __i1  Iterator referencing start of range to replace.</span>
<span id="L2306"><span class="lineNum">    2306</span>              :        *  @param __i2  Iterator referencing end of range to replace.</span>
<span id="L2307"><span class="lineNum">    2307</span>              :        *  @param __s  C string value to insert.</span>
<span id="L2308"><span class="lineNum">    2308</span>              :        *  @return  Reference to this string.</span>
<span id="L2309"><span class="lineNum">    2309</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L2310"><span class="lineNum">    2310</span>              :        *</span>
<span id="L2311"><span class="lineNum">    2311</span>              :        *  Removes the characters in the range [__i1,__i2).  In place,</span>
<span id="L2312"><span class="lineNum">    2312</span>              :        *  the characters of @a __s are inserted.  If the length of</span>
<span id="L2313"><span class="lineNum">    2313</span>              :        *  result exceeds max_size(), length_error is thrown.  The</span>
<span id="L2314"><span class="lineNum">    2314</span>              :        *  value of the string doesn't change if an error is thrown.</span>
<span id="L2315"><span class="lineNum">    2315</span>              :       */</span>
<span id="L2316"><span class="lineNum">    2316</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2317"><span class="lineNum">    2317</span>              :       basic_string&amp;</span>
<span id="L2318"><span class="lineNum">    2318</span>              :       replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s)</span>
<span id="L2319"><span class="lineNum">    2319</span>              :       {</span>
<span id="L2320"><span class="lineNum">    2320</span>              :         __glibcxx_requires_string(__s);</span>
<span id="L2321"><span class="lineNum">    2321</span>              :         return this-&gt;replace(__i1, __i2, __s, traits_type::length(__s));</span>
<span id="L2322"><span class="lineNum">    2322</span>              :       }</span>
<span id="L2323"><span class="lineNum">    2323</span>              : </span>
<span id="L2324"><span class="lineNum">    2324</span>              :       /**</span>
<span id="L2325"><span class="lineNum">    2325</span>              :        *  @brief  Replace range of characters with multiple characters</span>
<span id="L2326"><span class="lineNum">    2326</span>              :        *  @param __i1  Iterator referencing start of range to replace.</span>
<span id="L2327"><span class="lineNum">    2327</span>              :        *  @param __i2  Iterator referencing end of range to replace.</span>
<span id="L2328"><span class="lineNum">    2328</span>              :        *  @param __n  Number of characters to insert.</span>
<span id="L2329"><span class="lineNum">    2329</span>              :        *  @param __c  Character to insert.</span>
<span id="L2330"><span class="lineNum">    2330</span>              :        *  @return  Reference to this string.</span>
<span id="L2331"><span class="lineNum">    2331</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L2332"><span class="lineNum">    2332</span>              :        *</span>
<span id="L2333"><span class="lineNum">    2333</span>              :        *  Removes the characters in the range [__i1,__i2).  In place,</span>
<span id="L2334"><span class="lineNum">    2334</span>              :        *  @a __n copies of @a __c are inserted.  If the length of</span>
<span id="L2335"><span class="lineNum">    2335</span>              :        *  result exceeds max_size(), length_error is thrown.  The</span>
<span id="L2336"><span class="lineNum">    2336</span>              :        *  value of the string doesn't change if an error is thrown.</span>
<span id="L2337"><span class="lineNum">    2337</span>              :       */</span>
<span id="L2338"><span class="lineNum">    2338</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2339"><span class="lineNum">    2339</span>              :       basic_string&amp;</span>
<span id="L2340"><span class="lineNum">    2340</span>              :       replace(__const_iterator __i1, __const_iterator __i2, size_type __n,</span>
<span id="L2341"><span class="lineNum">    2341</span>              :               _CharT __c)</span>
<span id="L2342"><span class="lineNum">    2342</span>              :       {</span>
<span id="L2343"><span class="lineNum">    2343</span>              :         _GLIBCXX_DEBUG_PEDASSERT(begin() &lt;= __i1 &amp;&amp; __i1 &lt;= __i2</span>
<span id="L2344"><span class="lineNum">    2344</span>              :                                  &amp;&amp; __i2 &lt;= end());</span>
<span id="L2345"><span class="lineNum">    2345</span>              :         return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __c);</span>
<span id="L2346"><span class="lineNum">    2346</span>              :       }</span>
<span id="L2347"><span class="lineNum">    2347</span>              : </span>
<span id="L2348"><span class="lineNum">    2348</span>              :       /**</span>
<span id="L2349"><span class="lineNum">    2349</span>              :        *  @brief  Replace range of characters with range.</span>
<span id="L2350"><span class="lineNum">    2350</span>              :        *  @param __i1  Iterator referencing start of range to replace.</span>
<span id="L2351"><span class="lineNum">    2351</span>              :        *  @param __i2  Iterator referencing end of range to replace.</span>
<span id="L2352"><span class="lineNum">    2352</span>              :        *  @param __k1  Iterator referencing start of range to insert.</span>
<span id="L2353"><span class="lineNum">    2353</span>              :        *  @param __k2  Iterator referencing end of range to insert.</span>
<span id="L2354"><span class="lineNum">    2354</span>              :        *  @return  Reference to this string.</span>
<span id="L2355"><span class="lineNum">    2355</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L2356"><span class="lineNum">    2356</span>              :        *</span>
<span id="L2357"><span class="lineNum">    2357</span>              :        *  Removes the characters in the range [__i1,__i2).  In place,</span>
<span id="L2358"><span class="lineNum">    2358</span>              :        *  characters in the range [__k1,__k2) are inserted.  If the</span>
<span id="L2359"><span class="lineNum">    2359</span>              :        *  length of result exceeds max_size(), length_error is thrown.</span>
<span id="L2360"><span class="lineNum">    2360</span>              :        *  The value of the string doesn't change if an error is</span>
<span id="L2361"><span class="lineNum">    2361</span>              :        *  thrown.</span>
<span id="L2362"><span class="lineNum">    2362</span>              :       */</span>
<span id="L2363"><span class="lineNum">    2363</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L2364"><span class="lineNum">    2364</span>              :       template&lt;class _InputIterator,</span>
<span id="L2365"><span class="lineNum">    2365</span>              :                typename = std::_RequireInputIter&lt;_InputIterator&gt;&gt;</span>
<span id="L2366"><span class="lineNum">    2366</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L2367"><span class="lineNum">    2367</span>              :         basic_string&amp;</span>
<span id="L2368"><span class="lineNum">    2368</span>              :         replace(const_iterator __i1, const_iterator __i2,</span>
<span id="L2369"><span class="lineNum">    2369</span>              :                 _InputIterator __k1, _InputIterator __k2)</span>
<span id="L2370"><span class="lineNum">    2370</span>              :         {</span>
<span id="L2371"><span class="lineNum">    2371</span>              :           _GLIBCXX_DEBUG_PEDASSERT(begin() &lt;= __i1 &amp;&amp; __i1 &lt;= __i2</span>
<span id="L2372"><span class="lineNum">    2372</span>              :                                    &amp;&amp; __i2 &lt;= end());</span>
<span id="L2373"><span class="lineNum">    2373</span>              :           __glibcxx_requires_valid_range(__k1, __k2);</span>
<span id="L2374"><span class="lineNum">    2374</span>              :           return this-&gt;_M_replace_dispatch(__i1, __i2, __k1, __k2,</span>
<span id="L2375"><span class="lineNum">    2375</span>              :                                            std::__false_type());</span>
<span id="L2376"><span class="lineNum">    2376</span>              :         }</span>
<span id="L2377"><span class="lineNum">    2377</span>              : #else</span>
<span id="L2378"><span class="lineNum">    2378</span>              :       template&lt;class _InputIterator&gt;</span>
<span id="L2379"><span class="lineNum">    2379</span>              : #ifdef _GLIBCXX_DISAMBIGUATE_REPLACE_INST</span>
<span id="L2380"><span class="lineNum">    2380</span>              :         typename __enable_if_not_native_iterator&lt;_InputIterator&gt;::__type</span>
<span id="L2381"><span class="lineNum">    2381</span>              : #else</span>
<span id="L2382"><span class="lineNum">    2382</span>              :         basic_string&amp;</span>
<span id="L2383"><span class="lineNum">    2383</span>              : #endif</span>
<span id="L2384"><span class="lineNum">    2384</span>              :         replace(iterator __i1, iterator __i2,</span>
<span id="L2385"><span class="lineNum">    2385</span>              :                 _InputIterator __k1, _InputIterator __k2)</span>
<span id="L2386"><span class="lineNum">    2386</span>              :         {</span>
<span id="L2387"><span class="lineNum">    2387</span>              :           _GLIBCXX_DEBUG_PEDASSERT(begin() &lt;= __i1 &amp;&amp; __i1 &lt;= __i2</span>
<span id="L2388"><span class="lineNum">    2388</span>              :                                    &amp;&amp; __i2 &lt;= end());</span>
<span id="L2389"><span class="lineNum">    2389</span>              :           __glibcxx_requires_valid_range(__k1, __k2);</span>
<span id="L2390"><span class="lineNum">    2390</span>              :           typedef typename std::__is_integer&lt;_InputIterator&gt;::__type _Integral;</span>
<span id="L2391"><span class="lineNum">    2391</span>              :           return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral());</span>
<span id="L2392"><span class="lineNum">    2392</span>              :         }</span>
<span id="L2393"><span class="lineNum">    2393</span>              : #endif</span>
<span id="L2394"><span class="lineNum">    2394</span>              : </span>
<span id="L2395"><span class="lineNum">    2395</span>              :       // Specializations for the common case of pointer and iterator:</span>
<span id="L2396"><span class="lineNum">    2396</span>              :       // useful to avoid the overhead of temporary buffering in _M_replace.</span>
<span id="L2397"><span class="lineNum">    2397</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2398"><span class="lineNum">    2398</span>              :       basic_string&amp;</span>
<span id="L2399"><span class="lineNum">    2399</span>              :       replace(__const_iterator __i1, __const_iterator __i2,</span>
<span id="L2400"><span class="lineNum">    2400</span>              :               _CharT* __k1, _CharT* __k2)</span>
<span id="L2401"><span class="lineNum">    2401</span>              :       {</span>
<span id="L2402"><span class="lineNum">    2402</span>              :         _GLIBCXX_DEBUG_PEDASSERT(begin() &lt;= __i1 &amp;&amp; __i1 &lt;= __i2</span>
<span id="L2403"><span class="lineNum">    2403</span>              :                                  &amp;&amp; __i2 &lt;= end());</span>
<span id="L2404"><span class="lineNum">    2404</span>              :         __glibcxx_requires_valid_range(__k1, __k2);</span>
<span id="L2405"><span class="lineNum">    2405</span>              :         return this-&gt;replace(__i1 - begin(), __i2 - __i1,</span>
<span id="L2406"><span class="lineNum">    2406</span>              :                              __k1, __k2 - __k1);</span>
<span id="L2407"><span class="lineNum">    2407</span>              :       }</span>
<span id="L2408"><span class="lineNum">    2408</span>              : </span>
<span id="L2409"><span class="lineNum">    2409</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2410"><span class="lineNum">    2410</span>              :       basic_string&amp;</span>
<span id="L2411"><span class="lineNum">    2411</span>              :       replace(__const_iterator __i1, __const_iterator __i2,</span>
<span id="L2412"><span class="lineNum">    2412</span>              :               const _CharT* __k1, const _CharT* __k2)</span>
<span id="L2413"><span class="lineNum">    2413</span>              :       {</span>
<span id="L2414"><span class="lineNum">    2414</span>              :         _GLIBCXX_DEBUG_PEDASSERT(begin() &lt;= __i1 &amp;&amp; __i1 &lt;= __i2</span>
<span id="L2415"><span class="lineNum">    2415</span>              :                                  &amp;&amp; __i2 &lt;= end());</span>
<span id="L2416"><span class="lineNum">    2416</span>              :         __glibcxx_requires_valid_range(__k1, __k2);</span>
<span id="L2417"><span class="lineNum">    2417</span>              :         return this-&gt;replace(__i1 - begin(), __i2 - __i1,</span>
<span id="L2418"><span class="lineNum">    2418</span>              :                              __k1, __k2 - __k1);</span>
<span id="L2419"><span class="lineNum">    2419</span>              :       }</span>
<span id="L2420"><span class="lineNum">    2420</span>              : </span>
<span id="L2421"><span class="lineNum">    2421</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2422"><span class="lineNum">    2422</span>              :       basic_string&amp;</span>
<span id="L2423"><span class="lineNum">    2423</span>              :       replace(__const_iterator __i1, __const_iterator __i2,</span>
<span id="L2424"><span class="lineNum">    2424</span>              :               iterator __k1, iterator __k2)</span>
<span id="L2425"><span class="lineNum">    2425</span>              :       {</span>
<span id="L2426"><span class="lineNum">    2426</span>              :         _GLIBCXX_DEBUG_PEDASSERT(begin() &lt;= __i1 &amp;&amp; __i1 &lt;= __i2</span>
<span id="L2427"><span class="lineNum">    2427</span>              :                                  &amp;&amp; __i2 &lt;= end());</span>
<span id="L2428"><span class="lineNum">    2428</span>              :         __glibcxx_requires_valid_range(__k1, __k2);</span>
<span id="L2429"><span class="lineNum">    2429</span>              :         return this-&gt;replace(__i1 - begin(), __i2 - __i1,</span>
<span id="L2430"><span class="lineNum">    2430</span>              :                              __k1.base(), __k2 - __k1);</span>
<span id="L2431"><span class="lineNum">    2431</span>              :       }</span>
<span id="L2432"><span class="lineNum">    2432</span>              : </span>
<span id="L2433"><span class="lineNum">    2433</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2434"><span class="lineNum">    2434</span>              :       basic_string&amp;</span>
<span id="L2435"><span class="lineNum">    2435</span>              :       replace(__const_iterator __i1, __const_iterator __i2,</span>
<span id="L2436"><span class="lineNum">    2436</span>              :               const_iterator __k1, const_iterator __k2)</span>
<span id="L2437"><span class="lineNum">    2437</span>              :       {</span>
<span id="L2438"><span class="lineNum">    2438</span>              :         _GLIBCXX_DEBUG_PEDASSERT(begin() &lt;= __i1 &amp;&amp; __i1 &lt;= __i2</span>
<span id="L2439"><span class="lineNum">    2439</span>              :                                  &amp;&amp; __i2 &lt;= end());</span>
<span id="L2440"><span class="lineNum">    2440</span>              :         __glibcxx_requires_valid_range(__k1, __k2);</span>
<span id="L2441"><span class="lineNum">    2441</span>              :         return this-&gt;replace(__i1 - begin(), __i2 - __i1,</span>
<span id="L2442"><span class="lineNum">    2442</span>              :                              __k1.base(), __k2 - __k1);</span>
<span id="L2443"><span class="lineNum">    2443</span>              :       }</span>
<span id="L2444"><span class="lineNum">    2444</span>              : </span>
<span id="L2445"><span class="lineNum">    2445</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L2446"><span class="lineNum">    2446</span>              :       /**</span>
<span id="L2447"><span class="lineNum">    2447</span>              :        *  @brief  Replace range of characters with initializer_list.</span>
<span id="L2448"><span class="lineNum">    2448</span>              :        *  @param __i1  Iterator referencing start of range to replace.</span>
<span id="L2449"><span class="lineNum">    2449</span>              :        *  @param __i2  Iterator referencing end of range to replace.</span>
<span id="L2450"><span class="lineNum">    2450</span>              :        *  @param __l  The initializer_list of characters to insert.</span>
<span id="L2451"><span class="lineNum">    2451</span>              :        *  @return  Reference to this string.</span>
<span id="L2452"><span class="lineNum">    2452</span>              :        *  @throw  std::length_error  If new length exceeds @c max_size().</span>
<span id="L2453"><span class="lineNum">    2453</span>              :        *</span>
<span id="L2454"><span class="lineNum">    2454</span>              :        *  Removes the characters in the range [__i1,__i2).  In place,</span>
<span id="L2455"><span class="lineNum">    2455</span>              :        *  characters in the range [__k1,__k2) are inserted.  If the</span>
<span id="L2456"><span class="lineNum">    2456</span>              :        *  length of result exceeds max_size(), length_error is thrown.</span>
<span id="L2457"><span class="lineNum">    2457</span>              :        *  The value of the string doesn't change if an error is</span>
<span id="L2458"><span class="lineNum">    2458</span>              :        *  thrown.</span>
<span id="L2459"><span class="lineNum">    2459</span>              :       */</span>
<span id="L2460"><span class="lineNum">    2460</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2461"><span class="lineNum">    2461</span>              :       basic_string&amp; replace(const_iterator __i1, const_iterator __i2,</span>
<span id="L2462"><span class="lineNum">    2462</span>              :                             initializer_list&lt;_CharT&gt; __l)</span>
<span id="L2463"><span class="lineNum">    2463</span>              :       { return this-&gt;replace(__i1, __i2, __l.begin(), __l.size()); }</span>
<span id="L2464"><span class="lineNum">    2464</span>              : #endif // C++11</span>
<span id="L2465"><span class="lineNum">    2465</span>              : </span>
<span id="L2466"><span class="lineNum">    2466</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L2467"><span class="lineNum">    2467</span>              :       /**</span>
<span id="L2468"><span class="lineNum">    2468</span>              :        *  @brief  Replace range of characters with string_view.</span>
<span id="L2469"><span class="lineNum">    2469</span>              :        *  @param __pos  The position to replace at.</span>
<span id="L2470"><span class="lineNum">    2470</span>              :        *  @param __n    The number of characters to replace.</span>
<span id="L2471"><span class="lineNum">    2471</span>              :        *  @param __svt  The object convertible to string_view to insert.</span>
<span id="L2472"><span class="lineNum">    2472</span>              :        *  @return  Reference to this string.</span>
<span id="L2473"><span class="lineNum">    2473</span>              :       */</span>
<span id="L2474"><span class="lineNum">    2474</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L2475"><span class="lineNum">    2475</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L2476"><span class="lineNum">    2476</span>              :         _If_sv&lt;_Tp, basic_string&amp;&gt;</span>
<span id="L2477"><span class="lineNum">    2477</span>              :         replace(size_type __pos, size_type __n, const _Tp&amp; __svt)</span>
<span id="L2478"><span class="lineNum">    2478</span>              :         {</span>
<span id="L2479"><span class="lineNum">    2479</span>              :           __sv_type __sv = __svt;</span>
<span id="L2480"><span class="lineNum">    2480</span>              :           return this-&gt;replace(__pos, __n, __sv.data(), __sv.size());</span>
<span id="L2481"><span class="lineNum">    2481</span>              :         }</span>
<span id="L2482"><span class="lineNum">    2482</span>              : </span>
<span id="L2483"><span class="lineNum">    2483</span>              :       /**</span>
<span id="L2484"><span class="lineNum">    2484</span>              :        *  @brief  Replace range of characters with string_view.</span>
<span id="L2485"><span class="lineNum">    2485</span>              :        *  @param __pos1  The position to replace at.</span>
<span id="L2486"><span class="lineNum">    2486</span>              :        *  @param __n1    The number of characters to replace.</span>
<span id="L2487"><span class="lineNum">    2487</span>              :        *  @param __svt   The object convertible to string_view to insert from.</span>
<span id="L2488"><span class="lineNum">    2488</span>              :        *  @param __pos2  The position in the string_view to insert from.</span>
<span id="L2489"><span class="lineNum">    2489</span>              :        *  @param __n2    The number of characters to insert.</span>
<span id="L2490"><span class="lineNum">    2490</span>              :        *  @return  Reference to this string.</span>
<span id="L2491"><span class="lineNum">    2491</span>              :       */</span>
<span id="L2492"><span class="lineNum">    2492</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L2493"><span class="lineNum">    2493</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L2494"><span class="lineNum">    2494</span>              :         _If_sv&lt;_Tp, basic_string&amp;&gt;</span>
<span id="L2495"><span class="lineNum">    2495</span>              :         replace(size_type __pos1, size_type __n1, const _Tp&amp; __svt,</span>
<span id="L2496"><span class="lineNum">    2496</span>              :                 size_type __pos2, size_type __n2 = npos)</span>
<span id="L2497"><span class="lineNum">    2497</span>              :         {</span>
<span id="L2498"><span class="lineNum">    2498</span>              :           __sv_type __sv = __svt;</span>
<span id="L2499"><span class="lineNum">    2499</span>              :           return this-&gt;replace(__pos1, __n1,</span>
<span id="L2500"><span class="lineNum">    2500</span>              :               __sv.data()</span>
<span id="L2501"><span class="lineNum">    2501</span>              :               + std::__sv_check(__sv.size(), __pos2, &quot;basic_string::replace&quot;),</span>
<span id="L2502"><span class="lineNum">    2502</span>              :               std::__sv_limit(__sv.size(), __pos2, __n2));</span>
<span id="L2503"><span class="lineNum">    2503</span>              :         }</span>
<span id="L2504"><span class="lineNum">    2504</span>              : </span>
<span id="L2505"><span class="lineNum">    2505</span>              :       /**</span>
<span id="L2506"><span class="lineNum">    2506</span>              :        *  @brief  Replace range of characters with string_view.</span>
<span id="L2507"><span class="lineNum">    2507</span>              :        *  @param __i1    An iterator referencing the start position</span>
<span id="L2508"><span class="lineNum">    2508</span>              :           to replace at.</span>
<span id="L2509"><span class="lineNum">    2509</span>              :        *  @param __i2    An iterator referencing the end position</span>
<span id="L2510"><span class="lineNum">    2510</span>              :           for the replace.</span>
<span id="L2511"><span class="lineNum">    2511</span>              :        *  @param __svt   The object convertible to string_view to insert from.</span>
<span id="L2512"><span class="lineNum">    2512</span>              :        *  @return  Reference to this string.</span>
<span id="L2513"><span class="lineNum">    2513</span>              :       */</span>
<span id="L2514"><span class="lineNum">    2514</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L2515"><span class="lineNum">    2515</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L2516"><span class="lineNum">    2516</span>              :         _If_sv&lt;_Tp, basic_string&amp;&gt;</span>
<span id="L2517"><span class="lineNum">    2517</span>              :         replace(const_iterator __i1, const_iterator __i2, const _Tp&amp; __svt)</span>
<span id="L2518"><span class="lineNum">    2518</span>              :         {</span>
<span id="L2519"><span class="lineNum">    2519</span>              :           __sv_type __sv = __svt;</span>
<span id="L2520"><span class="lineNum">    2520</span>              :           return this-&gt;replace(__i1 - begin(), __i2 - __i1, __sv);</span>
<span id="L2521"><span class="lineNum">    2521</span>              :         }</span>
<span id="L2522"><span class="lineNum">    2522</span>              : #endif // C++17</span>
<span id="L2523"><span class="lineNum">    2523</span>              : </span>
<span id="L2524"><span class="lineNum">    2524</span>              :     private:</span>
<span id="L2525"><span class="lineNum">    2525</span>              :       template&lt;class _Integer&gt;</span>
<span id="L2526"><span class="lineNum">    2526</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L2527"><span class="lineNum">    2527</span>              :         basic_string&amp;</span>
<span id="L2528"><span class="lineNum">    2528</span>              :         _M_replace_dispatch(const_iterator __i1, const_iterator __i2,</span>
<span id="L2529"><span class="lineNum">    2529</span>              :                             _Integer __n, _Integer __val, __true_type)</span>
<span id="L2530"><span class="lineNum">    2530</span>              :         { return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __val); }</span>
<span id="L2531"><span class="lineNum">    2531</span>              : </span>
<span id="L2532"><span class="lineNum">    2532</span>              :       template&lt;class _InputIterator&gt;</span>
<span id="L2533"><span class="lineNum">    2533</span>              :         _GLIBCXX20_CONSTEXPR</span>
<span id="L2534"><span class="lineNum">    2534</span>              :         basic_string&amp;</span>
<span id="L2535"><span class="lineNum">    2535</span>              :         _M_replace_dispatch(const_iterator __i1, const_iterator __i2,</span>
<span id="L2536"><span class="lineNum">    2536</span>              :                             _InputIterator __k1, _InputIterator __k2,</span>
<span id="L2537"><span class="lineNum">    2537</span>              :                             __false_type);</span>
<span id="L2538"><span class="lineNum">    2538</span>              : </span>
<span id="L2539"><span class="lineNum">    2539</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2540"><span class="lineNum">    2540</span>              :       basic_string&amp;</span>
<span id="L2541"><span class="lineNum">    2541</span>              :       _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,</span>
<span id="L2542"><span class="lineNum">    2542</span>              :                      _CharT __c);</span>
<span id="L2543"><span class="lineNum">    2543</span>              : </span>
<span id="L2544"><span class="lineNum">    2544</span>              :       __attribute__((__noinline__, __noclone__, __cold__)) void</span>
<span id="L2545"><span class="lineNum">    2545</span>              :       _M_replace_cold(pointer __p, size_type __len1, const _CharT* __s,</span>
<span id="L2546"><span class="lineNum">    2546</span>              :                       const size_type __len2, const size_type __how_much);</span>
<span id="L2547"><span class="lineNum">    2547</span>              : </span>
<span id="L2548"><span class="lineNum">    2548</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2549"><span class="lineNum">    2549</span>              :       basic_string&amp;</span>
<span id="L2550"><span class="lineNum">    2550</span>              :       _M_replace(size_type __pos, size_type __len1, const _CharT* __s,</span>
<span id="L2551"><span class="lineNum">    2551</span>              :                  const size_type __len2);</span>
<span id="L2552"><span class="lineNum">    2552</span>              : </span>
<span id="L2553"><span class="lineNum">    2553</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2554"><span class="lineNum">    2554</span>              :       basic_string&amp;</span>
<span id="L2555"><span class="lineNum">    2555</span>              :       _M_append(const _CharT* __s, size_type __n);</span>
<span id="L2556"><span class="lineNum">    2556</span>              : </span>
<span id="L2557"><span class="lineNum">    2557</span>              :     public:</span>
<span id="L2558"><span class="lineNum">    2558</span>              : </span>
<span id="L2559"><span class="lineNum">    2559</span>              :       /**</span>
<span id="L2560"><span class="lineNum">    2560</span>              :        *  @brief  Copy substring into C string.</span>
<span id="L2561"><span class="lineNum">    2561</span>              :        *  @param __s  C string to copy value into.</span>
<span id="L2562"><span class="lineNum">    2562</span>              :        *  @param __n  Number of characters to copy.</span>
<span id="L2563"><span class="lineNum">    2563</span>              :        *  @param __pos  Index of first character to copy.</span>
<span id="L2564"><span class="lineNum">    2564</span>              :        *  @return  Number of characters actually copied</span>
<span id="L2565"><span class="lineNum">    2565</span>              :        *  @throw  std::out_of_range  If __pos &gt; size().</span>
<span id="L2566"><span class="lineNum">    2566</span>              :        *</span>
<span id="L2567"><span class="lineNum">    2567</span>              :        *  Copies up to @a __n characters starting at @a __pos into the</span>
<span id="L2568"><span class="lineNum">    2568</span>              :        *  C string @a __s.  If @a __pos is %greater than size(),</span>
<span id="L2569"><span class="lineNum">    2569</span>              :        *  out_of_range is thrown.</span>
<span id="L2570"><span class="lineNum">    2570</span>              :       */</span>
<span id="L2571"><span class="lineNum">    2571</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2572"><span class="lineNum">    2572</span>              :       size_type</span>
<span id="L2573"><span class="lineNum">    2573</span>              :       copy(_CharT* __s, size_type __n, size_type __pos = 0) const;</span>
<span id="L2574"><span class="lineNum">    2574</span>              : </span>
<span id="L2575"><span class="lineNum">    2575</span>              :       /**</span>
<span id="L2576"><span class="lineNum">    2576</span>              :        *  @brief  Swap contents with another string.</span>
<span id="L2577"><span class="lineNum">    2577</span>              :        *  @param __s  String to swap with.</span>
<span id="L2578"><span class="lineNum">    2578</span>              :        *</span>
<span id="L2579"><span class="lineNum">    2579</span>              :        *  Exchanges the contents of this string with that of @a __s in constant</span>
<span id="L2580"><span class="lineNum">    2580</span>              :        *  time.</span>
<span id="L2581"><span class="lineNum">    2581</span>              :       */</span>
<span id="L2582"><span class="lineNum">    2582</span>              :       _GLIBCXX20_CONSTEXPR</span>
<span id="L2583"><span class="lineNum">    2583</span>              :       void</span>
<span id="L2584"><span class="lineNum">    2584</span>              :       swap(basic_string&amp; __s) _GLIBCXX_NOEXCEPT;</span>
<span id="L2585"><span class="lineNum">    2585</span>              : </span>
<span id="L2586"><span class="lineNum">    2586</span>              :       // String operations:</span>
<span id="L2587"><span class="lineNum">    2587</span>              :       /**</span>
<span id="L2588"><span class="lineNum">    2588</span>              :        *  @brief  Return const pointer to null-terminated contents.</span>
<span id="L2589"><span class="lineNum">    2589</span>              :        *</span>
<span id="L2590"><span class="lineNum">    2590</span>              :        *  This is a handle to internal data.  Do not modify or dire things may</span>
<span id="L2591"><span class="lineNum">    2591</span>              :        *  happen.</span>
<span id="L2592"><span class="lineNum">    2592</span>              :       */</span>
<span id="L2593"><span class="lineNum">    2593</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2594"><span class="lineNum">    2594</span>              :       const _CharT*</span>
<span id="L2595"><span class="lineNum">    2595</span>              :       c_str() const _GLIBCXX_NOEXCEPT</span>
<span id="L2596"><span class="lineNum">    2596</span>              :       { return _M_data(); }</span>
<span id="L2597"><span class="lineNum">    2597</span>              : </span>
<span id="L2598"><span class="lineNum">    2598</span>              :       /**</span>
<span id="L2599"><span class="lineNum">    2599</span>              :        *  @brief  Return const pointer to contents.</span>
<span id="L2600"><span class="lineNum">    2600</span>              :        *</span>
<span id="L2601"><span class="lineNum">    2601</span>              :        *  This is a pointer to internal data.  It is undefined to modify</span>
<span id="L2602"><span class="lineNum">    2602</span>              :        *  the contents through the returned pointer. To get a pointer that</span>
<span id="L2603"><span class="lineNum">    2603</span>              :        *  allows modifying the contents use @c &amp;str[0] instead,</span>
<span id="L2604"><span class="lineNum">    2604</span>              :        *  (or in C++17 the non-const @c str.data() overload).</span>
<span id="L2605"><span class="lineNum">    2605</span>              :       */</span>
<span id="L2606"><span class="lineNum">    2606</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2607"><span class="lineNum">    2607</span>              :       const _CharT*</span>
<span id="L2608"><span class="lineNum">    2608</span>              :       data() const _GLIBCXX_NOEXCEPT</span>
<span id="L2609"><span class="lineNum">    2609</span>              :       { return _M_data(); }</span>
<span id="L2610"><span class="lineNum">    2610</span>              : </span>
<span id="L2611"><span class="lineNum">    2611</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L2612"><span class="lineNum">    2612</span>              :       /**</span>
<span id="L2613"><span class="lineNum">    2613</span>              :        *  @brief  Return non-const pointer to contents.</span>
<span id="L2614"><span class="lineNum">    2614</span>              :        *</span>
<span id="L2615"><span class="lineNum">    2615</span>              :        *  This is a pointer to the character sequence held by the string.</span>
<span id="L2616"><span class="lineNum">    2616</span>              :        *  Modifying the characters in the sequence is allowed.</span>
<span id="L2617"><span class="lineNum">    2617</span>              :       */</span>
<span id="L2618"><span class="lineNum">    2618</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2619"><span class="lineNum">    2619</span>              :       _CharT*</span>
<span id="L2620"><span class="lineNum">    2620</span>              :       data() noexcept</span>
<span id="L2621"><span class="lineNum">    2621</span>              :       { return _M_data(); }</span>
<span id="L2622"><span class="lineNum">    2622</span>              : #endif</span>
<span id="L2623"><span class="lineNum">    2623</span>              : </span>
<span id="L2624"><span class="lineNum">    2624</span>              :       /**</span>
<span id="L2625"><span class="lineNum">    2625</span>              :        *  @brief  Return copy of allocator used to construct this string.</span>
<span id="L2626"><span class="lineNum">    2626</span>              :       */</span>
<span id="L2627"><span class="lineNum">    2627</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2628"><span class="lineNum">    2628</span>              :       allocator_type</span>
<span id="L2629"><span class="lineNum">    2629</span>              :       get_allocator() const _GLIBCXX_NOEXCEPT</span>
<span id="L2630"><span class="lineNum">    2630</span>              :       { return _M_get_allocator(); }</span>
<span id="L2631"><span class="lineNum">    2631</span>              : </span>
<span id="L2632"><span class="lineNum">    2632</span>              :       /**</span>
<span id="L2633"><span class="lineNum">    2633</span>              :        *  @brief  Find position of a C substring.</span>
<span id="L2634"><span class="lineNum">    2634</span>              :        *  @param __s  C string to locate.</span>
<span id="L2635"><span class="lineNum">    2635</span>              :        *  @param __pos  Index of character to search from.</span>
<span id="L2636"><span class="lineNum">    2636</span>              :        *  @param __n  Number of characters from @a s to search for.</span>
<span id="L2637"><span class="lineNum">    2637</span>              :        *  @return  Index of start of first occurrence.</span>
<span id="L2638"><span class="lineNum">    2638</span>              :        *</span>
<span id="L2639"><span class="lineNum">    2639</span>              :        *  Starting from @a __pos, searches forward for the first @a</span>
<span id="L2640"><span class="lineNum">    2640</span>              :        *  __n characters in @a __s within this string.  If found,</span>
<span id="L2641"><span class="lineNum">    2641</span>              :        *  returns the index where it begins.  If not found, returns</span>
<span id="L2642"><span class="lineNum">    2642</span>              :        *  npos.</span>
<span id="L2643"><span class="lineNum">    2643</span>              :       */</span>
<span id="L2644"><span class="lineNum">    2644</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2645"><span class="lineNum">    2645</span>              :       size_type</span>
<span id="L2646"><span class="lineNum">    2646</span>              :       find(const _CharT* __s, size_type __pos, size_type __n) const</span>
<span id="L2647"><span class="lineNum">    2647</span>              :       _GLIBCXX_NOEXCEPT;</span>
<span id="L2648"><span class="lineNum">    2648</span>              : </span>
<span id="L2649"><span class="lineNum">    2649</span>              :       /**</span>
<span id="L2650"><span class="lineNum">    2650</span>              :        *  @brief  Find position of a string.</span>
<span id="L2651"><span class="lineNum">    2651</span>              :        *  @param __str  String to locate.</span>
<span id="L2652"><span class="lineNum">    2652</span>              :        *  @param __pos  Index of character to search from (default 0).</span>
<span id="L2653"><span class="lineNum">    2653</span>              :        *  @return  Index of start of first occurrence.</span>
<span id="L2654"><span class="lineNum">    2654</span>              :        *</span>
<span id="L2655"><span class="lineNum">    2655</span>              :        *  Starting from @a __pos, searches forward for value of @a __str within</span>
<span id="L2656"><span class="lineNum">    2656</span>              :        *  this string.  If found, returns the index where it begins.  If not</span>
<span id="L2657"><span class="lineNum">    2657</span>              :        *  found, returns npos.</span>
<span id="L2658"><span class="lineNum">    2658</span>              :       */</span>
<span id="L2659"><span class="lineNum">    2659</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2660"><span class="lineNum">    2660</span>              :       size_type</span>
<span id="L2661"><span class="lineNum">    2661</span>              :       find(const basic_string&amp; __str, size_type __pos = 0) const</span>
<span id="L2662"><span class="lineNum">    2662</span>              :       _GLIBCXX_NOEXCEPT</span>
<span id="L2663"><span class="lineNum">    2663</span>              :       { return this-&gt;find(__str.data(), __pos, __str.size()); }</span>
<span id="L2664"><span class="lineNum">    2664</span>              : </span>
<span id="L2665"><span class="lineNum">    2665</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L2666"><span class="lineNum">    2666</span>              :       /**</span>
<span id="L2667"><span class="lineNum">    2667</span>              :        *  @brief  Find position of a string_view.</span>
<span id="L2668"><span class="lineNum">    2668</span>              :        *  @param __svt  The object convertible to string_view to locate.</span>
<span id="L2669"><span class="lineNum">    2669</span>              :        *  @param __pos  Index of character to search from (default 0).</span>
<span id="L2670"><span class="lineNum">    2670</span>              :        *  @return  Index of start of first occurrence.</span>
<span id="L2671"><span class="lineNum">    2671</span>              :       */</span>
<span id="L2672"><span class="lineNum">    2672</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L2673"><span class="lineNum">    2673</span>              :         _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2674"><span class="lineNum">    2674</span>              :         _If_sv&lt;_Tp, size_type&gt;</span>
<span id="L2675"><span class="lineNum">    2675</span>              :         find(const _Tp&amp; __svt, size_type __pos = 0) const</span>
<span id="L2676"><span class="lineNum">    2676</span>              :         noexcept(is_same&lt;_Tp, __sv_type&gt;::value)</span>
<span id="L2677"><span class="lineNum">    2677</span>              :         {</span>
<span id="L2678"><span class="lineNum">    2678</span>              :           __sv_type __sv = __svt;</span>
<span id="L2679"><span class="lineNum">    2679</span>              :           return this-&gt;find(__sv.data(), __pos, __sv.size());</span>
<span id="L2680"><span class="lineNum">    2680</span>              :         }</span>
<span id="L2681"><span class="lineNum">    2681</span>              : #endif // C++17</span>
<span id="L2682"><span class="lineNum">    2682</span>              : </span>
<span id="L2683"><span class="lineNum">    2683</span>              :       /**</span>
<span id="L2684"><span class="lineNum">    2684</span>              :        *  @brief  Find position of a C string.</span>
<span id="L2685"><span class="lineNum">    2685</span>              :        *  @param __s  C string to locate.</span>
<span id="L2686"><span class="lineNum">    2686</span>              :        *  @param __pos  Index of character to search from (default 0).</span>
<span id="L2687"><span class="lineNum">    2687</span>              :        *  @return  Index of start of first occurrence.</span>
<span id="L2688"><span class="lineNum">    2688</span>              :        *</span>
<span id="L2689"><span class="lineNum">    2689</span>              :        *  Starting from @a __pos, searches forward for the value of @a</span>
<span id="L2690"><span class="lineNum">    2690</span>              :        *  __s within this string.  If found, returns the index where</span>
<span id="L2691"><span class="lineNum">    2691</span>              :        *  it begins.  If not found, returns npos.</span>
<span id="L2692"><span class="lineNum">    2692</span>              :       */</span>
<span id="L2693"><span class="lineNum">    2693</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2694"><span class="lineNum">    2694</span>              :       size_type</span>
<span id="L2695"><span class="lineNum">    2695</span>              :       find(const _CharT* __s, size_type __pos = 0) const _GLIBCXX_NOEXCEPT</span>
<span id="L2696"><span class="lineNum">    2696</span>              :       {</span>
<span id="L2697"><span class="lineNum">    2697</span>              :         __glibcxx_requires_string(__s);</span>
<span id="L2698"><span class="lineNum">    2698</span>              :         return this-&gt;find(__s, __pos, traits_type::length(__s));</span>
<span id="L2699"><span class="lineNum">    2699</span>              :       }</span>
<span id="L2700"><span class="lineNum">    2700</span>              : </span>
<span id="L2701"><span class="lineNum">    2701</span>              :       /**</span>
<span id="L2702"><span class="lineNum">    2702</span>              :        *  @brief  Find position of a character.</span>
<span id="L2703"><span class="lineNum">    2703</span>              :        *  @param __c  Character to locate.</span>
<span id="L2704"><span class="lineNum">    2704</span>              :        *  @param __pos  Index of character to search from (default 0).</span>
<span id="L2705"><span class="lineNum">    2705</span>              :        *  @return  Index of first occurrence.</span>
<span id="L2706"><span class="lineNum">    2706</span>              :        *</span>
<span id="L2707"><span class="lineNum">    2707</span>              :        *  Starting from @a __pos, searches forward for @a __c within</span>
<span id="L2708"><span class="lineNum">    2708</span>              :        *  this string.  If found, returns the index where it was</span>
<span id="L2709"><span class="lineNum">    2709</span>              :        *  found.  If not found, returns npos.</span>
<span id="L2710"><span class="lineNum">    2710</span>              :       */</span>
<span id="L2711"><span class="lineNum">    2711</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2712"><span class="lineNum">    2712</span>              :       size_type</span>
<span id="L2713"><span class="lineNum">    2713</span>              :       find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT;</span>
<span id="L2714"><span class="lineNum">    2714</span>              : </span>
<span id="L2715"><span class="lineNum">    2715</span>              :       /**</span>
<span id="L2716"><span class="lineNum">    2716</span>              :        *  @brief  Find last position of a string.</span>
<span id="L2717"><span class="lineNum">    2717</span>              :        *  @param __str  String to locate.</span>
<span id="L2718"><span class="lineNum">    2718</span>              :        *  @param __pos  Index of character to search back from (default end).</span>
<span id="L2719"><span class="lineNum">    2719</span>              :        *  @return  Index of start of last occurrence.</span>
<span id="L2720"><span class="lineNum">    2720</span>              :        *</span>
<span id="L2721"><span class="lineNum">    2721</span>              :        *  Starting from @a __pos, searches backward for value of @a</span>
<span id="L2722"><span class="lineNum">    2722</span>              :        *  __str within this string.  If found, returns the index where</span>
<span id="L2723"><span class="lineNum">    2723</span>              :        *  it begins.  If not found, returns npos.</span>
<span id="L2724"><span class="lineNum">    2724</span>              :       */</span>
<span id="L2725"><span class="lineNum">    2725</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2726"><span class="lineNum">    2726</span>              :       size_type</span>
<span id="L2727"><span class="lineNum">    2727</span>              :       rfind(const basic_string&amp; __str, size_type __pos = npos) const</span>
<span id="L2728"><span class="lineNum">    2728</span>              :       _GLIBCXX_NOEXCEPT</span>
<span id="L2729"><span class="lineNum">    2729</span>              :       { return this-&gt;rfind(__str.data(), __pos, __str.size()); }</span>
<span id="L2730"><span class="lineNum">    2730</span>              : </span>
<span id="L2731"><span class="lineNum">    2731</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L2732"><span class="lineNum">    2732</span>              :       /**</span>
<span id="L2733"><span class="lineNum">    2733</span>              :        *  @brief  Find last position of a string_view.</span>
<span id="L2734"><span class="lineNum">    2734</span>              :        *  @param __svt  The object convertible to string_view to locate.</span>
<span id="L2735"><span class="lineNum">    2735</span>              :        *  @param __pos  Index of character to search back from (default end).</span>
<span id="L2736"><span class="lineNum">    2736</span>              :        *  @return  Index of start of last occurrence.</span>
<span id="L2737"><span class="lineNum">    2737</span>              :       */</span>
<span id="L2738"><span class="lineNum">    2738</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L2739"><span class="lineNum">    2739</span>              :         _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2740"><span class="lineNum">    2740</span>              :         _If_sv&lt;_Tp, size_type&gt;</span>
<span id="L2741"><span class="lineNum">    2741</span>              :         rfind(const _Tp&amp; __svt, size_type __pos = npos) const</span>
<span id="L2742"><span class="lineNum">    2742</span>              :         noexcept(is_same&lt;_Tp, __sv_type&gt;::value)</span>
<span id="L2743"><span class="lineNum">    2743</span>              :         {</span>
<span id="L2744"><span class="lineNum">    2744</span>              :           __sv_type __sv = __svt;</span>
<span id="L2745"><span class="lineNum">    2745</span>              :           return this-&gt;rfind(__sv.data(), __pos, __sv.size());</span>
<span id="L2746"><span class="lineNum">    2746</span>              :         }</span>
<span id="L2747"><span class="lineNum">    2747</span>              : #endif // C++17</span>
<span id="L2748"><span class="lineNum">    2748</span>              : </span>
<span id="L2749"><span class="lineNum">    2749</span>              :       /**</span>
<span id="L2750"><span class="lineNum">    2750</span>              :        *  @brief  Find last position of a C substring.</span>
<span id="L2751"><span class="lineNum">    2751</span>              :        *  @param __s  C string to locate.</span>
<span id="L2752"><span class="lineNum">    2752</span>              :        *  @param __pos  Index of character to search back from.</span>
<span id="L2753"><span class="lineNum">    2753</span>              :        *  @param __n  Number of characters from s to search for.</span>
<span id="L2754"><span class="lineNum">    2754</span>              :        *  @return  Index of start of last occurrence.</span>
<span id="L2755"><span class="lineNum">    2755</span>              :        *</span>
<span id="L2756"><span class="lineNum">    2756</span>              :        *  Starting from @a __pos, searches backward for the first @a</span>
<span id="L2757"><span class="lineNum">    2757</span>              :        *  __n characters in @a __s within this string.  If found,</span>
<span id="L2758"><span class="lineNum">    2758</span>              :        *  returns the index where it begins.  If not found, returns</span>
<span id="L2759"><span class="lineNum">    2759</span>              :        *  npos.</span>
<span id="L2760"><span class="lineNum">    2760</span>              :       */</span>
<span id="L2761"><span class="lineNum">    2761</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2762"><span class="lineNum">    2762</span>              :       size_type</span>
<span id="L2763"><span class="lineNum">    2763</span>              :       rfind(const _CharT* __s, size_type __pos, size_type __n) const</span>
<span id="L2764"><span class="lineNum">    2764</span>              :       _GLIBCXX_NOEXCEPT;</span>
<span id="L2765"><span class="lineNum">    2765</span>              : </span>
<span id="L2766"><span class="lineNum">    2766</span>              :       /**</span>
<span id="L2767"><span class="lineNum">    2767</span>              :        *  @brief  Find last position of a C string.</span>
<span id="L2768"><span class="lineNum">    2768</span>              :        *  @param __s  C string to locate.</span>
<span id="L2769"><span class="lineNum">    2769</span>              :        *  @param __pos  Index of character to start search at (default end).</span>
<span id="L2770"><span class="lineNum">    2770</span>              :        *  @return  Index of start of  last occurrence.</span>
<span id="L2771"><span class="lineNum">    2771</span>              :        *</span>
<span id="L2772"><span class="lineNum">    2772</span>              :        *  Starting from @a __pos, searches backward for the value of</span>
<span id="L2773"><span class="lineNum">    2773</span>              :        *  @a __s within this string.  If found, returns the index</span>
<span id="L2774"><span class="lineNum">    2774</span>              :        *  where it begins.  If not found, returns npos.</span>
<span id="L2775"><span class="lineNum">    2775</span>              :       */</span>
<span id="L2776"><span class="lineNum">    2776</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2777"><span class="lineNum">    2777</span>              :       size_type</span>
<span id="L2778"><span class="lineNum">    2778</span>              :       rfind(const _CharT* __s, size_type __pos = npos) const</span>
<span id="L2779"><span class="lineNum">    2779</span>              :       {</span>
<span id="L2780"><span class="lineNum">    2780</span>              :         __glibcxx_requires_string(__s);</span>
<span id="L2781"><span class="lineNum">    2781</span>              :         return this-&gt;rfind(__s, __pos, traits_type::length(__s));</span>
<span id="L2782"><span class="lineNum">    2782</span>              :       }</span>
<span id="L2783"><span class="lineNum">    2783</span>              : </span>
<span id="L2784"><span class="lineNum">    2784</span>              :       /**</span>
<span id="L2785"><span class="lineNum">    2785</span>              :        *  @brief  Find last position of a character.</span>
<span id="L2786"><span class="lineNum">    2786</span>              :        *  @param __c  Character to locate.</span>
<span id="L2787"><span class="lineNum">    2787</span>              :        *  @param __pos  Index of character to search back from (default end).</span>
<span id="L2788"><span class="lineNum">    2788</span>              :        *  @return  Index of last occurrence.</span>
<span id="L2789"><span class="lineNum">    2789</span>              :        *</span>
<span id="L2790"><span class="lineNum">    2790</span>              :        *  Starting from @a __pos, searches backward for @a __c within</span>
<span id="L2791"><span class="lineNum">    2791</span>              :        *  this string.  If found, returns the index where it was</span>
<span id="L2792"><span class="lineNum">    2792</span>              :        *  found.  If not found, returns npos.</span>
<span id="L2793"><span class="lineNum">    2793</span>              :       */</span>
<span id="L2794"><span class="lineNum">    2794</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2795"><span class="lineNum">    2795</span>              :       size_type</span>
<span id="L2796"><span class="lineNum">    2796</span>              :       rfind(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT;</span>
<span id="L2797"><span class="lineNum">    2797</span>              : </span>
<span id="L2798"><span class="lineNum">    2798</span>              :       /**</span>
<span id="L2799"><span class="lineNum">    2799</span>              :        *  @brief  Find position of a character of string.</span>
<span id="L2800"><span class="lineNum">    2800</span>              :        *  @param __str  String containing characters to locate.</span>
<span id="L2801"><span class="lineNum">    2801</span>              :        *  @param __pos  Index of character to search from (default 0).</span>
<span id="L2802"><span class="lineNum">    2802</span>              :        *  @return  Index of first occurrence.</span>
<span id="L2803"><span class="lineNum">    2803</span>              :        *</span>
<span id="L2804"><span class="lineNum">    2804</span>              :        *  Starting from @a __pos, searches forward for one of the</span>
<span id="L2805"><span class="lineNum">    2805</span>              :        *  characters of @a __str within this string.  If found,</span>
<span id="L2806"><span class="lineNum">    2806</span>              :        *  returns the index where it was found.  If not found, returns</span>
<span id="L2807"><span class="lineNum">    2807</span>              :        *  npos.</span>
<span id="L2808"><span class="lineNum">    2808</span>              :       */</span>
<span id="L2809"><span class="lineNum">    2809</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2810"><span class="lineNum">    2810</span>              :       size_type</span>
<span id="L2811"><span class="lineNum">    2811</span>              :       find_first_of(const basic_string&amp; __str, size_type __pos = 0) const</span>
<span id="L2812"><span class="lineNum">    2812</span>              :       _GLIBCXX_NOEXCEPT</span>
<span id="L2813"><span class="lineNum">    2813</span>              :       { return this-&gt;find_first_of(__str.data(), __pos, __str.size()); }</span>
<span id="L2814"><span class="lineNum">    2814</span>              : </span>
<span id="L2815"><span class="lineNum">    2815</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L2816"><span class="lineNum">    2816</span>              :       /**</span>
<span id="L2817"><span class="lineNum">    2817</span>              :        *  @brief  Find position of a character of a string_view.</span>
<span id="L2818"><span class="lineNum">    2818</span>              :        *  @param __svt  An object convertible to string_view containing</span>
<span id="L2819"><span class="lineNum">    2819</span>              :        *                characters to locate.</span>
<span id="L2820"><span class="lineNum">    2820</span>              :        *  @param __pos  Index of character to search from (default 0).</span>
<span id="L2821"><span class="lineNum">    2821</span>              :        *  @return  Index of first occurrence.</span>
<span id="L2822"><span class="lineNum">    2822</span>              :       */</span>
<span id="L2823"><span class="lineNum">    2823</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L2824"><span class="lineNum">    2824</span>              :         _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2825"><span class="lineNum">    2825</span>              :         _If_sv&lt;_Tp, size_type&gt;</span>
<span id="L2826"><span class="lineNum">    2826</span>              :         find_first_of(const _Tp&amp; __svt, size_type __pos = 0) const</span>
<span id="L2827"><span class="lineNum">    2827</span>              :         noexcept(is_same&lt;_Tp, __sv_type&gt;::value)</span>
<span id="L2828"><span class="lineNum">    2828</span>              :         {</span>
<span id="L2829"><span class="lineNum">    2829</span>              :           __sv_type __sv = __svt;</span>
<span id="L2830"><span class="lineNum">    2830</span>              :           return this-&gt;find_first_of(__sv.data(), __pos, __sv.size());</span>
<span id="L2831"><span class="lineNum">    2831</span>              :         }</span>
<span id="L2832"><span class="lineNum">    2832</span>              : #endif // C++17</span>
<span id="L2833"><span class="lineNum">    2833</span>              : </span>
<span id="L2834"><span class="lineNum">    2834</span>              :       /**</span>
<span id="L2835"><span class="lineNum">    2835</span>              :        *  @brief  Find position of a character of C substring.</span>
<span id="L2836"><span class="lineNum">    2836</span>              :        *  @param __s  String containing characters to locate.</span>
<span id="L2837"><span class="lineNum">    2837</span>              :        *  @param __pos  Index of character to search from.</span>
<span id="L2838"><span class="lineNum">    2838</span>              :        *  @param __n  Number of characters from s to search for.</span>
<span id="L2839"><span class="lineNum">    2839</span>              :        *  @return  Index of first occurrence.</span>
<span id="L2840"><span class="lineNum">    2840</span>              :        *</span>
<span id="L2841"><span class="lineNum">    2841</span>              :        *  Starting from @a __pos, searches forward for one of the</span>
<span id="L2842"><span class="lineNum">    2842</span>              :        *  first @a __n characters of @a __s within this string.  If</span>
<span id="L2843"><span class="lineNum">    2843</span>              :        *  found, returns the index where it was found.  If not found,</span>
<span id="L2844"><span class="lineNum">    2844</span>              :        *  returns npos.</span>
<span id="L2845"><span class="lineNum">    2845</span>              :       */</span>
<span id="L2846"><span class="lineNum">    2846</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2847"><span class="lineNum">    2847</span>              :       size_type</span>
<span id="L2848"><span class="lineNum">    2848</span>              :       find_first_of(const _CharT* __s, size_type __pos, size_type __n) const</span>
<span id="L2849"><span class="lineNum">    2849</span>              :       _GLIBCXX_NOEXCEPT;</span>
<span id="L2850"><span class="lineNum">    2850</span>              : </span>
<span id="L2851"><span class="lineNum">    2851</span>              :       /**</span>
<span id="L2852"><span class="lineNum">    2852</span>              :        *  @brief  Find position of a character of C string.</span>
<span id="L2853"><span class="lineNum">    2853</span>              :        *  @param __s  String containing characters to locate.</span>
<span id="L2854"><span class="lineNum">    2854</span>              :        *  @param __pos  Index of character to search from (default 0).</span>
<span id="L2855"><span class="lineNum">    2855</span>              :        *  @return  Index of first occurrence.</span>
<span id="L2856"><span class="lineNum">    2856</span>              :        *</span>
<span id="L2857"><span class="lineNum">    2857</span>              :        *  Starting from @a __pos, searches forward for one of the</span>
<span id="L2858"><span class="lineNum">    2858</span>              :        *  characters of @a __s within this string.  If found, returns</span>
<span id="L2859"><span class="lineNum">    2859</span>              :        *  the index where it was found.  If not found, returns npos.</span>
<span id="L2860"><span class="lineNum">    2860</span>              :       */</span>
<span id="L2861"><span class="lineNum">    2861</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2862"><span class="lineNum">    2862</span>              :       size_type</span>
<span id="L2863"><span class="lineNum">    2863</span>              :       find_first_of(const _CharT* __s, size_type __pos = 0) const</span>
<span id="L2864"><span class="lineNum">    2864</span>              :       _GLIBCXX_NOEXCEPT</span>
<span id="L2865"><span class="lineNum">    2865</span>              :       {</span>
<span id="L2866"><span class="lineNum">    2866</span>              :         __glibcxx_requires_string(__s);</span>
<span id="L2867"><span class="lineNum">    2867</span>              :         return this-&gt;find_first_of(__s, __pos, traits_type::length(__s));</span>
<span id="L2868"><span class="lineNum">    2868</span>              :       }</span>
<span id="L2869"><span class="lineNum">    2869</span>              : </span>
<span id="L2870"><span class="lineNum">    2870</span>              :       /**</span>
<span id="L2871"><span class="lineNum">    2871</span>              :        *  @brief  Find position of a character.</span>
<span id="L2872"><span class="lineNum">    2872</span>              :        *  @param __c  Character to locate.</span>
<span id="L2873"><span class="lineNum">    2873</span>              :        *  @param __pos  Index of character to search from (default 0).</span>
<span id="L2874"><span class="lineNum">    2874</span>              :        *  @return  Index of first occurrence.</span>
<span id="L2875"><span class="lineNum">    2875</span>              :        *</span>
<span id="L2876"><span class="lineNum">    2876</span>              :        *  Starting from @a __pos, searches forward for the character</span>
<span id="L2877"><span class="lineNum">    2877</span>              :        *  @a __c within this string.  If found, returns the index</span>
<span id="L2878"><span class="lineNum">    2878</span>              :        *  where it was found.  If not found, returns npos.</span>
<span id="L2879"><span class="lineNum">    2879</span>              :        *</span>
<span id="L2880"><span class="lineNum">    2880</span>              :        *  Note: equivalent to find(__c, __pos).</span>
<span id="L2881"><span class="lineNum">    2881</span>              :       */</span>
<span id="L2882"><span class="lineNum">    2882</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2883"><span class="lineNum">    2883</span>              :       size_type</span>
<span id="L2884"><span class="lineNum">    2884</span>              :       find_first_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT</span>
<span id="L2885"><span class="lineNum">    2885</span>              :       { return this-&gt;find(__c, __pos); }</span>
<span id="L2886"><span class="lineNum">    2886</span>              : </span>
<span id="L2887"><span class="lineNum">    2887</span>              :       /**</span>
<span id="L2888"><span class="lineNum">    2888</span>              :        *  @brief  Find last position of a character of string.</span>
<span id="L2889"><span class="lineNum">    2889</span>              :        *  @param __str  String containing characters to locate.</span>
<span id="L2890"><span class="lineNum">    2890</span>              :        *  @param __pos  Index of character to search back from (default end).</span>
<span id="L2891"><span class="lineNum">    2891</span>              :        *  @return  Index of last occurrence.</span>
<span id="L2892"><span class="lineNum">    2892</span>              :        *</span>
<span id="L2893"><span class="lineNum">    2893</span>              :        *  Starting from @a __pos, searches backward for one of the</span>
<span id="L2894"><span class="lineNum">    2894</span>              :        *  characters of @a __str within this string.  If found,</span>
<span id="L2895"><span class="lineNum">    2895</span>              :        *  returns the index where it was found.  If not found, returns</span>
<span id="L2896"><span class="lineNum">    2896</span>              :        *  npos.</span>
<span id="L2897"><span class="lineNum">    2897</span>              :       */</span>
<span id="L2898"><span class="lineNum">    2898</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2899"><span class="lineNum">    2899</span>              :       size_type</span>
<span id="L2900"><span class="lineNum">    2900</span>              :       find_last_of(const basic_string&amp; __str, size_type __pos = npos) const</span>
<span id="L2901"><span class="lineNum">    2901</span>              :       _GLIBCXX_NOEXCEPT</span>
<span id="L2902"><span class="lineNum">    2902</span>              :       { return this-&gt;find_last_of(__str.data(), __pos, __str.size()); }</span>
<span id="L2903"><span class="lineNum">    2903</span>              : </span>
<span id="L2904"><span class="lineNum">    2904</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L2905"><span class="lineNum">    2905</span>              :       /**</span>
<span id="L2906"><span class="lineNum">    2906</span>              :        *  @brief  Find last position of a character of string.</span>
<span id="L2907"><span class="lineNum">    2907</span>              :        *  @param __svt  An object convertible to string_view containing</span>
<span id="L2908"><span class="lineNum">    2908</span>              :        *                characters to locate.</span>
<span id="L2909"><span class="lineNum">    2909</span>              :        *  @param __pos  Index of character to search back from (default end).</span>
<span id="L2910"><span class="lineNum">    2910</span>              :        *  @return  Index of last occurrence.</span>
<span id="L2911"><span class="lineNum">    2911</span>              :       */</span>
<span id="L2912"><span class="lineNum">    2912</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L2913"><span class="lineNum">    2913</span>              :         _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2914"><span class="lineNum">    2914</span>              :         _If_sv&lt;_Tp, size_type&gt;</span>
<span id="L2915"><span class="lineNum">    2915</span>              :         find_last_of(const _Tp&amp; __svt, size_type __pos = npos) const</span>
<span id="L2916"><span class="lineNum">    2916</span>              :         noexcept(is_same&lt;_Tp, __sv_type&gt;::value)</span>
<span id="L2917"><span class="lineNum">    2917</span>              :         {</span>
<span id="L2918"><span class="lineNum">    2918</span>              :           __sv_type __sv = __svt;</span>
<span id="L2919"><span class="lineNum">    2919</span>              :           return this-&gt;find_last_of(__sv.data(), __pos, __sv.size());</span>
<span id="L2920"><span class="lineNum">    2920</span>              :         }</span>
<span id="L2921"><span class="lineNum">    2921</span>              : #endif // C++17</span>
<span id="L2922"><span class="lineNum">    2922</span>              : </span>
<span id="L2923"><span class="lineNum">    2923</span>              :       /**</span>
<span id="L2924"><span class="lineNum">    2924</span>              :        *  @brief  Find last position of a character of C substring.</span>
<span id="L2925"><span class="lineNum">    2925</span>              :        *  @param __s  C string containing characters to locate.</span>
<span id="L2926"><span class="lineNum">    2926</span>              :        *  @param __pos  Index of character to search back from.</span>
<span id="L2927"><span class="lineNum">    2927</span>              :        *  @param __n  Number of characters from s to search for.</span>
<span id="L2928"><span class="lineNum">    2928</span>              :        *  @return  Index of last occurrence.</span>
<span id="L2929"><span class="lineNum">    2929</span>              :        *</span>
<span id="L2930"><span class="lineNum">    2930</span>              :        *  Starting from @a __pos, searches backward for one of the</span>
<span id="L2931"><span class="lineNum">    2931</span>              :        *  first @a __n characters of @a __s within this string.  If</span>
<span id="L2932"><span class="lineNum">    2932</span>              :        *  found, returns the index where it was found.  If not found,</span>
<span id="L2933"><span class="lineNum">    2933</span>              :        *  returns npos.</span>
<span id="L2934"><span class="lineNum">    2934</span>              :       */</span>
<span id="L2935"><span class="lineNum">    2935</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2936"><span class="lineNum">    2936</span>              :       size_type</span>
<span id="L2937"><span class="lineNum">    2937</span>              :       find_last_of(const _CharT* __s, size_type __pos, size_type __n) const</span>
<span id="L2938"><span class="lineNum">    2938</span>              :       _GLIBCXX_NOEXCEPT;</span>
<span id="L2939"><span class="lineNum">    2939</span>              : </span>
<span id="L2940"><span class="lineNum">    2940</span>              :       /**</span>
<span id="L2941"><span class="lineNum">    2941</span>              :        *  @brief  Find last position of a character of C string.</span>
<span id="L2942"><span class="lineNum">    2942</span>              :        *  @param __s  C string containing characters to locate.</span>
<span id="L2943"><span class="lineNum">    2943</span>              :        *  @param __pos  Index of character to search back from (default end).</span>
<span id="L2944"><span class="lineNum">    2944</span>              :        *  @return  Index of last occurrence.</span>
<span id="L2945"><span class="lineNum">    2945</span>              :        *</span>
<span id="L2946"><span class="lineNum">    2946</span>              :        *  Starting from @a __pos, searches backward for one of the</span>
<span id="L2947"><span class="lineNum">    2947</span>              :        *  characters of @a __s within this string.  If found, returns</span>
<span id="L2948"><span class="lineNum">    2948</span>              :        *  the index where it was found.  If not found, returns npos.</span>
<span id="L2949"><span class="lineNum">    2949</span>              :       */</span>
<span id="L2950"><span class="lineNum">    2950</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2951"><span class="lineNum">    2951</span>              :       size_type</span>
<span id="L2952"><span class="lineNum">    2952</span>              :       find_last_of(const _CharT* __s, size_type __pos = npos) const</span>
<span id="L2953"><span class="lineNum">    2953</span>              :       _GLIBCXX_NOEXCEPT</span>
<span id="L2954"><span class="lineNum">    2954</span>              :       {</span>
<span id="L2955"><span class="lineNum">    2955</span>              :         __glibcxx_requires_string(__s);</span>
<span id="L2956"><span class="lineNum">    2956</span>              :         return this-&gt;find_last_of(__s, __pos, traits_type::length(__s));</span>
<span id="L2957"><span class="lineNum">    2957</span>              :       }</span>
<span id="L2958"><span class="lineNum">    2958</span>              : </span>
<span id="L2959"><span class="lineNum">    2959</span>              :       /**</span>
<span id="L2960"><span class="lineNum">    2960</span>              :        *  @brief  Find last position of a character.</span>
<span id="L2961"><span class="lineNum">    2961</span>              :        *  @param __c  Character to locate.</span>
<span id="L2962"><span class="lineNum">    2962</span>              :        *  @param __pos  Index of character to search back from (default end).</span>
<span id="L2963"><span class="lineNum">    2963</span>              :        *  @return  Index of last occurrence.</span>
<span id="L2964"><span class="lineNum">    2964</span>              :        *</span>
<span id="L2965"><span class="lineNum">    2965</span>              :        *  Starting from @a __pos, searches backward for @a __c within</span>
<span id="L2966"><span class="lineNum">    2966</span>              :        *  this string.  If found, returns the index where it was</span>
<span id="L2967"><span class="lineNum">    2967</span>              :        *  found.  If not found, returns npos.</span>
<span id="L2968"><span class="lineNum">    2968</span>              :        *</span>
<span id="L2969"><span class="lineNum">    2969</span>              :        *  Note: equivalent to rfind(__c, __pos).</span>
<span id="L2970"><span class="lineNum">    2970</span>              :       */</span>
<span id="L2971"><span class="lineNum">    2971</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2972"><span class="lineNum">    2972</span>              :       size_type</span>
<span id="L2973"><span class="lineNum">    2973</span>              :       find_last_of(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT</span>
<span id="L2974"><span class="lineNum">    2974</span>              :       { return this-&gt;rfind(__c, __pos); }</span>
<span id="L2975"><span class="lineNum">    2975</span>              : </span>
<span id="L2976"><span class="lineNum">    2976</span>              :       /**</span>
<span id="L2977"><span class="lineNum">    2977</span>              :        *  @brief  Find position of a character not in string.</span>
<span id="L2978"><span class="lineNum">    2978</span>              :        *  @param __str  String containing characters to avoid.</span>
<span id="L2979"><span class="lineNum">    2979</span>              :        *  @param __pos  Index of character to search from (default 0).</span>
<span id="L2980"><span class="lineNum">    2980</span>              :        *  @return  Index of first occurrence.</span>
<span id="L2981"><span class="lineNum">    2981</span>              :        *</span>
<span id="L2982"><span class="lineNum">    2982</span>              :        *  Starting from @a __pos, searches forward for a character not contained</span>
<span id="L2983"><span class="lineNum">    2983</span>              :        *  in @a __str within this string.  If found, returns the index where it</span>
<span id="L2984"><span class="lineNum">    2984</span>              :        *  was found.  If not found, returns npos.</span>
<span id="L2985"><span class="lineNum">    2985</span>              :       */</span>
<span id="L2986"><span class="lineNum">    2986</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L2987"><span class="lineNum">    2987</span>              :       size_type</span>
<span id="L2988"><span class="lineNum">    2988</span>              :       find_first_not_of(const basic_string&amp; __str, size_type __pos = 0) const</span>
<span id="L2989"><span class="lineNum">    2989</span>              :       _GLIBCXX_NOEXCEPT</span>
<span id="L2990"><span class="lineNum">    2990</span>              :       { return this-&gt;find_first_not_of(__str.data(), __pos, __str.size()); }</span>
<span id="L2991"><span class="lineNum">    2991</span>              : </span>
<span id="L2992"><span class="lineNum">    2992</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L2993"><span class="lineNum">    2993</span>              :       /**</span>
<span id="L2994"><span class="lineNum">    2994</span>              :        *  @brief  Find position of a character not in a string_view.</span>
<span id="L2995"><span class="lineNum">    2995</span>              :        *  @param __svt  A object convertible to string_view containing</span>
<span id="L2996"><span class="lineNum">    2996</span>              :        *                characters to avoid.</span>
<span id="L2997"><span class="lineNum">    2997</span>              :        *  @param __pos  Index of character to search from (default 0).</span>
<span id="L2998"><span class="lineNum">    2998</span>              :        *  @return  Index of first occurrence.</span>
<span id="L2999"><span class="lineNum">    2999</span>              :        */</span>
<span id="L3000"><span class="lineNum">    3000</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L3001"><span class="lineNum">    3001</span>              :         _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3002"><span class="lineNum">    3002</span>              :         _If_sv&lt;_Tp, size_type&gt;</span>
<span id="L3003"><span class="lineNum">    3003</span>              :         find_first_not_of(const _Tp&amp; __svt, size_type __pos = 0) const</span>
<span id="L3004"><span class="lineNum">    3004</span>              :         noexcept(is_same&lt;_Tp, __sv_type&gt;::value)</span>
<span id="L3005"><span class="lineNum">    3005</span>              :         {</span>
<span id="L3006"><span class="lineNum">    3006</span>              :           __sv_type __sv = __svt;</span>
<span id="L3007"><span class="lineNum">    3007</span>              :           return this-&gt;find_first_not_of(__sv.data(), __pos, __sv.size());</span>
<span id="L3008"><span class="lineNum">    3008</span>              :         }</span>
<span id="L3009"><span class="lineNum">    3009</span>              : #endif // C++17</span>
<span id="L3010"><span class="lineNum">    3010</span>              : </span>
<span id="L3011"><span class="lineNum">    3011</span>              :       /**</span>
<span id="L3012"><span class="lineNum">    3012</span>              :        *  @brief  Find position of a character not in C substring.</span>
<span id="L3013"><span class="lineNum">    3013</span>              :        *  @param __s  C string containing characters to avoid.</span>
<span id="L3014"><span class="lineNum">    3014</span>              :        *  @param __pos  Index of character to search from.</span>
<span id="L3015"><span class="lineNum">    3015</span>              :        *  @param __n  Number of characters from __s to consider.</span>
<span id="L3016"><span class="lineNum">    3016</span>              :        *  @return  Index of first occurrence.</span>
<span id="L3017"><span class="lineNum">    3017</span>              :        *</span>
<span id="L3018"><span class="lineNum">    3018</span>              :        *  Starting from @a __pos, searches forward for a character not</span>
<span id="L3019"><span class="lineNum">    3019</span>              :        *  contained in the first @a __n characters of @a __s within</span>
<span id="L3020"><span class="lineNum">    3020</span>              :        *  this string.  If found, returns the index where it was</span>
<span id="L3021"><span class="lineNum">    3021</span>              :        *  found.  If not found, returns npos.</span>
<span id="L3022"><span class="lineNum">    3022</span>              :       */</span>
<span id="L3023"><span class="lineNum">    3023</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3024"><span class="lineNum">    3024</span>              :       size_type</span>
<span id="L3025"><span class="lineNum">    3025</span>              :       find_first_not_of(const _CharT* __s, size_type __pos,</span>
<span id="L3026"><span class="lineNum">    3026</span>              :                         size_type __n) const _GLIBCXX_NOEXCEPT;</span>
<span id="L3027"><span class="lineNum">    3027</span>              : </span>
<span id="L3028"><span class="lineNum">    3028</span>              :       /**</span>
<span id="L3029"><span class="lineNum">    3029</span>              :        *  @brief  Find position of a character not in C string.</span>
<span id="L3030"><span class="lineNum">    3030</span>              :        *  @param __s  C string containing characters to avoid.</span>
<span id="L3031"><span class="lineNum">    3031</span>              :        *  @param __pos  Index of character to search from (default 0).</span>
<span id="L3032"><span class="lineNum">    3032</span>              :        *  @return  Index of first occurrence.</span>
<span id="L3033"><span class="lineNum">    3033</span>              :        *</span>
<span id="L3034"><span class="lineNum">    3034</span>              :        *  Starting from @a __pos, searches forward for a character not</span>
<span id="L3035"><span class="lineNum">    3035</span>              :        *  contained in @a __s within this string.  If found, returns</span>
<span id="L3036"><span class="lineNum">    3036</span>              :        *  the index where it was found.  If not found, returns npos.</span>
<span id="L3037"><span class="lineNum">    3037</span>              :       */</span>
<span id="L3038"><span class="lineNum">    3038</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3039"><span class="lineNum">    3039</span>              :       size_type</span>
<span id="L3040"><span class="lineNum">    3040</span>              :       find_first_not_of(const _CharT* __s, size_type __pos = 0) const</span>
<span id="L3041"><span class="lineNum">    3041</span>              :       _GLIBCXX_NOEXCEPT</span>
<span id="L3042"><span class="lineNum">    3042</span>              :       {</span>
<span id="L3043"><span class="lineNum">    3043</span>              :         __glibcxx_requires_string(__s);</span>
<span id="L3044"><span class="lineNum">    3044</span>              :         return this-&gt;find_first_not_of(__s, __pos, traits_type::length(__s));</span>
<span id="L3045"><span class="lineNum">    3045</span>              :       }</span>
<span id="L3046"><span class="lineNum">    3046</span>              : </span>
<span id="L3047"><span class="lineNum">    3047</span>              :       /**</span>
<span id="L3048"><span class="lineNum">    3048</span>              :        *  @brief  Find position of a different character.</span>
<span id="L3049"><span class="lineNum">    3049</span>              :        *  @param __c  Character to avoid.</span>
<span id="L3050"><span class="lineNum">    3050</span>              :        *  @param __pos  Index of character to search from (default 0).</span>
<span id="L3051"><span class="lineNum">    3051</span>              :        *  @return  Index of first occurrence.</span>
<span id="L3052"><span class="lineNum">    3052</span>              :        *</span>
<span id="L3053"><span class="lineNum">    3053</span>              :        *  Starting from @a __pos, searches forward for a character</span>
<span id="L3054"><span class="lineNum">    3054</span>              :        *  other than @a __c within this string.  If found, returns the</span>
<span id="L3055"><span class="lineNum">    3055</span>              :        *  index where it was found.  If not found, returns npos.</span>
<span id="L3056"><span class="lineNum">    3056</span>              :       */</span>
<span id="L3057"><span class="lineNum">    3057</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3058"><span class="lineNum">    3058</span>              :       size_type</span>
<span id="L3059"><span class="lineNum">    3059</span>              :       find_first_not_of(_CharT __c, size_type __pos = 0) const</span>
<span id="L3060"><span class="lineNum">    3060</span>              :       _GLIBCXX_NOEXCEPT;</span>
<span id="L3061"><span class="lineNum">    3061</span>              : </span>
<span id="L3062"><span class="lineNum">    3062</span>              :       /**</span>
<span id="L3063"><span class="lineNum">    3063</span>              :        *  @brief  Find last position of a character not in string.</span>
<span id="L3064"><span class="lineNum">    3064</span>              :        *  @param __str  String containing characters to avoid.</span>
<span id="L3065"><span class="lineNum">    3065</span>              :        *  @param __pos  Index of character to search back from (default end).</span>
<span id="L3066"><span class="lineNum">    3066</span>              :        *  @return  Index of last occurrence.</span>
<span id="L3067"><span class="lineNum">    3067</span>              :        *</span>
<span id="L3068"><span class="lineNum">    3068</span>              :        *  Starting from @a __pos, searches backward for a character</span>
<span id="L3069"><span class="lineNum">    3069</span>              :        *  not contained in @a __str within this string.  If found,</span>
<span id="L3070"><span class="lineNum">    3070</span>              :        *  returns the index where it was found.  If not found, returns</span>
<span id="L3071"><span class="lineNum">    3071</span>              :        *  npos.</span>
<span id="L3072"><span class="lineNum">    3072</span>              :       */</span>
<span id="L3073"><span class="lineNum">    3073</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3074"><span class="lineNum">    3074</span>              :       size_type</span>
<span id="L3075"><span class="lineNum">    3075</span>              :       find_last_not_of(const basic_string&amp; __str, size_type __pos = npos) const</span>
<span id="L3076"><span class="lineNum">    3076</span>              :       _GLIBCXX_NOEXCEPT</span>
<span id="L3077"><span class="lineNum">    3077</span>              :       { return this-&gt;find_last_not_of(__str.data(), __pos, __str.size()); }</span>
<span id="L3078"><span class="lineNum">    3078</span>              : </span>
<span id="L3079"><span class="lineNum">    3079</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L3080"><span class="lineNum">    3080</span>              :       /**</span>
<span id="L3081"><span class="lineNum">    3081</span>              :        *  @brief  Find last position of a character not in a string_view.</span>
<span id="L3082"><span class="lineNum">    3082</span>              :        *  @param __svt  An object convertible to string_view containing</span>
<span id="L3083"><span class="lineNum">    3083</span>              :        *                characters to avoid.</span>
<span id="L3084"><span class="lineNum">    3084</span>              :        *  @param __pos  Index of character to search back from (default end).</span>
<span id="L3085"><span class="lineNum">    3085</span>              :        *  @return  Index of last occurrence.</span>
<span id="L3086"><span class="lineNum">    3086</span>              :        */</span>
<span id="L3087"><span class="lineNum">    3087</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L3088"><span class="lineNum">    3088</span>              :         _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3089"><span class="lineNum">    3089</span>              :         _If_sv&lt;_Tp, size_type&gt;</span>
<span id="L3090"><span class="lineNum">    3090</span>              :         find_last_not_of(const _Tp&amp; __svt, size_type __pos = npos) const</span>
<span id="L3091"><span class="lineNum">    3091</span>              :         noexcept(is_same&lt;_Tp, __sv_type&gt;::value)</span>
<span id="L3092"><span class="lineNum">    3092</span>              :         {</span>
<span id="L3093"><span class="lineNum">    3093</span>              :           __sv_type __sv = __svt;</span>
<span id="L3094"><span class="lineNum">    3094</span>              :           return this-&gt;find_last_not_of(__sv.data(), __pos, __sv.size());</span>
<span id="L3095"><span class="lineNum">    3095</span>              :         }</span>
<span id="L3096"><span class="lineNum">    3096</span>              : #endif // C++17</span>
<span id="L3097"><span class="lineNum">    3097</span>              : </span>
<span id="L3098"><span class="lineNum">    3098</span>              :       /**</span>
<span id="L3099"><span class="lineNum">    3099</span>              :        *  @brief  Find last position of a character not in C substring.</span>
<span id="L3100"><span class="lineNum">    3100</span>              :        *  @param __s  C string containing characters to avoid.</span>
<span id="L3101"><span class="lineNum">    3101</span>              :        *  @param __pos  Index of character to search back from.</span>
<span id="L3102"><span class="lineNum">    3102</span>              :        *  @param __n  Number of characters from s to consider.</span>
<span id="L3103"><span class="lineNum">    3103</span>              :        *  @return  Index of last occurrence.</span>
<span id="L3104"><span class="lineNum">    3104</span>              :        *</span>
<span id="L3105"><span class="lineNum">    3105</span>              :        *  Starting from @a __pos, searches backward for a character not</span>
<span id="L3106"><span class="lineNum">    3106</span>              :        *  contained in the first @a __n characters of @a __s within this string.</span>
<span id="L3107"><span class="lineNum">    3107</span>              :        *  If found, returns the index where it was found.  If not found,</span>
<span id="L3108"><span class="lineNum">    3108</span>              :        *  returns npos.</span>
<span id="L3109"><span class="lineNum">    3109</span>              :       */</span>
<span id="L3110"><span class="lineNum">    3110</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3111"><span class="lineNum">    3111</span>              :       size_type</span>
<span id="L3112"><span class="lineNum">    3112</span>              :       find_last_not_of(const _CharT* __s, size_type __pos,</span>
<span id="L3113"><span class="lineNum">    3113</span>              :                        size_type __n) const _GLIBCXX_NOEXCEPT;</span>
<span id="L3114"><span class="lineNum">    3114</span>              :       /**</span>
<span id="L3115"><span class="lineNum">    3115</span>              :        *  @brief  Find last position of a character not in C string.</span>
<span id="L3116"><span class="lineNum">    3116</span>              :        *  @param __s  C string containing characters to avoid.</span>
<span id="L3117"><span class="lineNum">    3117</span>              :        *  @param __pos  Index of character to search back from (default end).</span>
<span id="L3118"><span class="lineNum">    3118</span>              :        *  @return  Index of last occurrence.</span>
<span id="L3119"><span class="lineNum">    3119</span>              :        *</span>
<span id="L3120"><span class="lineNum">    3120</span>              :        *  Starting from @a __pos, searches backward for a character</span>
<span id="L3121"><span class="lineNum">    3121</span>              :        *  not contained in @a __s within this string.  If found,</span>
<span id="L3122"><span class="lineNum">    3122</span>              :        *  returns the index where it was found.  If not found, returns</span>
<span id="L3123"><span class="lineNum">    3123</span>              :        *  npos.</span>
<span id="L3124"><span class="lineNum">    3124</span>              :       */</span>
<span id="L3125"><span class="lineNum">    3125</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3126"><span class="lineNum">    3126</span>              :       size_type</span>
<span id="L3127"><span class="lineNum">    3127</span>              :       find_last_not_of(const _CharT* __s, size_type __pos = npos) const</span>
<span id="L3128"><span class="lineNum">    3128</span>              :       _GLIBCXX_NOEXCEPT</span>
<span id="L3129"><span class="lineNum">    3129</span>              :       {</span>
<span id="L3130"><span class="lineNum">    3130</span>              :         __glibcxx_requires_string(__s);</span>
<span id="L3131"><span class="lineNum">    3131</span>              :         return this-&gt;find_last_not_of(__s, __pos, traits_type::length(__s));</span>
<span id="L3132"><span class="lineNum">    3132</span>              :       }</span>
<span id="L3133"><span class="lineNum">    3133</span>              : </span>
<span id="L3134"><span class="lineNum">    3134</span>              :       /**</span>
<span id="L3135"><span class="lineNum">    3135</span>              :        *  @brief  Find last position of a different character.</span>
<span id="L3136"><span class="lineNum">    3136</span>              :        *  @param __c  Character to avoid.</span>
<span id="L3137"><span class="lineNum">    3137</span>              :        *  @param __pos  Index of character to search back from (default end).</span>
<span id="L3138"><span class="lineNum">    3138</span>              :        *  @return  Index of last occurrence.</span>
<span id="L3139"><span class="lineNum">    3139</span>              :        *</span>
<span id="L3140"><span class="lineNum">    3140</span>              :        *  Starting from @a __pos, searches backward for a character other than</span>
<span id="L3141"><span class="lineNum">    3141</span>              :        *  @a __c within this string.  If found, returns the index where it was</span>
<span id="L3142"><span class="lineNum">    3142</span>              :        *  found.  If not found, returns npos.</span>
<span id="L3143"><span class="lineNum">    3143</span>              :       */</span>
<span id="L3144"><span class="lineNum">    3144</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3145"><span class="lineNum">    3145</span>              :       size_type</span>
<span id="L3146"><span class="lineNum">    3146</span>              :       find_last_not_of(_CharT __c, size_type __pos = npos) const</span>
<span id="L3147"><span class="lineNum">    3147</span>              :       _GLIBCXX_NOEXCEPT;</span>
<span id="L3148"><span class="lineNum">    3148</span>              : </span>
<span id="L3149"><span class="lineNum">    3149</span>              :       /**</span>
<span id="L3150"><span class="lineNum">    3150</span>              :        *  @brief  Get a substring.</span>
<span id="L3151"><span class="lineNum">    3151</span>              :        *  @param __pos  Index of first character (default 0).</span>
<span id="L3152"><span class="lineNum">    3152</span>              :        *  @param __n  Number of characters in substring (default remainder).</span>
<span id="L3153"><span class="lineNum">    3153</span>              :        *  @return  The new string.</span>
<span id="L3154"><span class="lineNum">    3154</span>              :        *  @throw  std::out_of_range  If __pos &gt; size().</span>
<span id="L3155"><span class="lineNum">    3155</span>              :        *</span>
<span id="L3156"><span class="lineNum">    3156</span>              :        *  Construct and return a new string using the @a __n</span>
<span id="L3157"><span class="lineNum">    3157</span>              :        *  characters starting at @a __pos.  If the string is too</span>
<span id="L3158"><span class="lineNum">    3158</span>              :        *  short, use the remainder of the characters.  If @a __pos is</span>
<span id="L3159"><span class="lineNum">    3159</span>              :        *  beyond the end of the string, out_of_range is thrown.</span>
<span id="L3160"><span class="lineNum">    3160</span>              :       */</span>
<span id="L3161"><span class="lineNum">    3161</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3162"><span class="lineNum">    3162</span>              :       basic_string</span>
<span id="L3163"><span class="lineNum">    3163</span>              :       substr(size_type __pos = 0, size_type __n = npos) const</span>
<span id="L3164"><span class="lineNum">    3164</span>              :       { return basic_string(*this,</span>
<span id="L3165"><span class="lineNum">    3165</span>              :                             _M_check(__pos, &quot;basic_string::substr&quot;), __n); }</span>
<span id="L3166"><span class="lineNum">    3166</span>              : </span>
<span id="L3167"><span class="lineNum">    3167</span>              :       /**</span>
<span id="L3168"><span class="lineNum">    3168</span>              :        *  @brief  Compare to a string.</span>
<span id="L3169"><span class="lineNum">    3169</span>              :        *  @param __str  String to compare against.</span>
<span id="L3170"><span class="lineNum">    3170</span>              :        *  @return  Integer &lt; 0, 0, or &gt; 0.</span>
<span id="L3171"><span class="lineNum">    3171</span>              :        *</span>
<span id="L3172"><span class="lineNum">    3172</span>              :        *  Returns an integer &lt; 0 if this string is ordered before @a</span>
<span id="L3173"><span class="lineNum">    3173</span>              :        *  __str, 0 if their values are equivalent, or &gt; 0 if this</span>
<span id="L3174"><span class="lineNum">    3174</span>              :        *  string is ordered after @a __str.  Determines the effective</span>
<span id="L3175"><span class="lineNum">    3175</span>              :        *  length rlen of the strings to compare as the smallest of</span>
<span id="L3176"><span class="lineNum">    3176</span>              :        *  size() and str.size().  The function then compares the two</span>
<span id="L3177"><span class="lineNum">    3177</span>              :        *  strings by calling traits::compare(data(), str.data(),rlen).</span>
<span id="L3178"><span class="lineNum">    3178</span>              :        *  If the result of the comparison is nonzero returns it,</span>
<span id="L3179"><span class="lineNum">    3179</span>              :        *  otherwise the shorter one is ordered first.</span>
<span id="L3180"><span class="lineNum">    3180</span>              :       */</span>
<span id="L3181"><span class="lineNum">    3181</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3182"><span class="lineNum">    3182</span>              :       int</span>
<span id="L3183"><span class="lineNum">    3183</span>              :       compare(const basic_string&amp; __str) const</span>
<span id="L3184"><span class="lineNum">    3184</span>              :       {</span>
<span id="L3185"><span class="lineNum">    3185</span>              :         const size_type __size = this-&gt;size();</span>
<span id="L3186"><span class="lineNum">    3186</span>              :         const size_type __osize = __str.size();</span>
<span id="L3187"><span class="lineNum">    3187</span>              :         const size_type __len = std::min(__size, __osize);</span>
<span id="L3188"><span class="lineNum">    3188</span>              : </span>
<span id="L3189"><span class="lineNum">    3189</span>              :         int __r = traits_type::compare(_M_data(), __str.data(), __len);</span>
<span id="L3190"><span class="lineNum">    3190</span>              :         if (!__r)</span>
<span id="L3191"><span class="lineNum">    3191</span>              :           __r = _S_compare(__size, __osize);</span>
<span id="L3192"><span class="lineNum">    3192</span>              :         return __r;</span>
<span id="L3193"><span class="lineNum">    3193</span>              :       }</span>
<span id="L3194"><span class="lineNum">    3194</span>              : </span>
<span id="L3195"><span class="lineNum">    3195</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L3196"><span class="lineNum">    3196</span>              :       /**</span>
<span id="L3197"><span class="lineNum">    3197</span>              :        *  @brief  Compare to a string_view.</span>
<span id="L3198"><span class="lineNum">    3198</span>              :        *  @param __svt An object convertible to string_view to compare against.</span>
<span id="L3199"><span class="lineNum">    3199</span>              :        *  @return  Integer &lt; 0, 0, or &gt; 0.</span>
<span id="L3200"><span class="lineNum">    3200</span>              :        */</span>
<span id="L3201"><span class="lineNum">    3201</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L3202"><span class="lineNum">    3202</span>              :         _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3203"><span class="lineNum">    3203</span>              :         _If_sv&lt;_Tp, int&gt;</span>
<span id="L3204"><span class="lineNum">    3204</span>              :         compare(const _Tp&amp; __svt) const</span>
<span id="L3205"><span class="lineNum">    3205</span>              :         noexcept(is_same&lt;_Tp, __sv_type&gt;::value)</span>
<span id="L3206"><span class="lineNum">    3206</span>              :         {</span>
<span id="L3207"><span class="lineNum">    3207</span>              :           __sv_type __sv = __svt;</span>
<span id="L3208"><span class="lineNum">    3208</span>              :           const size_type __size = this-&gt;size();</span>
<span id="L3209"><span class="lineNum">    3209</span>              :           const size_type __osize = __sv.size();</span>
<span id="L3210"><span class="lineNum">    3210</span>              :           const size_type __len = std::min(__size, __osize);</span>
<span id="L3211"><span class="lineNum">    3211</span>              : </span>
<span id="L3212"><span class="lineNum">    3212</span>              :           int __r = traits_type::compare(_M_data(), __sv.data(), __len);</span>
<span id="L3213"><span class="lineNum">    3213</span>              :           if (!__r)</span>
<span id="L3214"><span class="lineNum">    3214</span>              :             __r = _S_compare(__size, __osize);</span>
<span id="L3215"><span class="lineNum">    3215</span>              :           return __r;</span>
<span id="L3216"><span class="lineNum">    3216</span>              :         }</span>
<span id="L3217"><span class="lineNum">    3217</span>              : </span>
<span id="L3218"><span class="lineNum">    3218</span>              :       /**</span>
<span id="L3219"><span class="lineNum">    3219</span>              :        *  @brief  Compare to a string_view.</span>
<span id="L3220"><span class="lineNum">    3220</span>              :        *  @param __pos  A position in the string to start comparing from.</span>
<span id="L3221"><span class="lineNum">    3221</span>              :        *  @param __n  The number of characters to compare.</span>
<span id="L3222"><span class="lineNum">    3222</span>              :        *  @param __svt  An object convertible to string_view to compare</span>
<span id="L3223"><span class="lineNum">    3223</span>              :        *                against.</span>
<span id="L3224"><span class="lineNum">    3224</span>              :        *  @return  Integer &lt; 0, 0, or &gt; 0.</span>
<span id="L3225"><span class="lineNum">    3225</span>              :        */</span>
<span id="L3226"><span class="lineNum">    3226</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L3227"><span class="lineNum">    3227</span>              :         _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3228"><span class="lineNum">    3228</span>              :         _If_sv&lt;_Tp, int&gt;</span>
<span id="L3229"><span class="lineNum">    3229</span>              :         compare(size_type __pos, size_type __n, const _Tp&amp; __svt) const</span>
<span id="L3230"><span class="lineNum">    3230</span>              :         noexcept(is_same&lt;_Tp, __sv_type&gt;::value)</span>
<span id="L3231"><span class="lineNum">    3231</span>              :         {</span>
<span id="L3232"><span class="lineNum">    3232</span>              :           __sv_type __sv = __svt;</span>
<span id="L3233"><span class="lineNum">    3233</span>              :           return __sv_type(*this).substr(__pos, __n).compare(__sv);</span>
<span id="L3234"><span class="lineNum">    3234</span>              :         }</span>
<span id="L3235"><span class="lineNum">    3235</span>              : </span>
<span id="L3236"><span class="lineNum">    3236</span>              :       /**</span>
<span id="L3237"><span class="lineNum">    3237</span>              :        *  @brief  Compare to a string_view.</span>
<span id="L3238"><span class="lineNum">    3238</span>              :        *  @param __pos1  A position in the string to start comparing from.</span>
<span id="L3239"><span class="lineNum">    3239</span>              :        *  @param __n1  The number of characters to compare.</span>
<span id="L3240"><span class="lineNum">    3240</span>              :        *  @param __svt  An object convertible to string_view to compare</span>
<span id="L3241"><span class="lineNum">    3241</span>              :        *                against.</span>
<span id="L3242"><span class="lineNum">    3242</span>              :        *  @param __pos2  A position in the string_view to start comparing from.</span>
<span id="L3243"><span class="lineNum">    3243</span>              :        *  @param __n2  The number of characters to compare.</span>
<span id="L3244"><span class="lineNum">    3244</span>              :        *  @return  Integer &lt; 0, 0, or &gt; 0.</span>
<span id="L3245"><span class="lineNum">    3245</span>              :        */</span>
<span id="L3246"><span class="lineNum">    3246</span>              :       template&lt;typename _Tp&gt;</span>
<span id="L3247"><span class="lineNum">    3247</span>              :         _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3248"><span class="lineNum">    3248</span>              :         _If_sv&lt;_Tp, int&gt;</span>
<span id="L3249"><span class="lineNum">    3249</span>              :         compare(size_type __pos1, size_type __n1, const _Tp&amp; __svt,</span>
<span id="L3250"><span class="lineNum">    3250</span>              :                 size_type __pos2, size_type __n2 = npos) const</span>
<span id="L3251"><span class="lineNum">    3251</span>              :         noexcept(is_same&lt;_Tp, __sv_type&gt;::value)</span>
<span id="L3252"><span class="lineNum">    3252</span>              :         {</span>
<span id="L3253"><span class="lineNum">    3253</span>              :           __sv_type __sv = __svt;</span>
<span id="L3254"><span class="lineNum">    3254</span>              :           return __sv_type(*this)</span>
<span id="L3255"><span class="lineNum">    3255</span>              :             .substr(__pos1, __n1).compare(__sv.substr(__pos2, __n2));</span>
<span id="L3256"><span class="lineNum">    3256</span>              :         }</span>
<span id="L3257"><span class="lineNum">    3257</span>              : #endif // C++17</span>
<span id="L3258"><span class="lineNum">    3258</span>              : </span>
<span id="L3259"><span class="lineNum">    3259</span>              :       /**</span>
<span id="L3260"><span class="lineNum">    3260</span>              :        *  @brief  Compare substring to a string.</span>
<span id="L3261"><span class="lineNum">    3261</span>              :        *  @param __pos  Index of first character of substring.</span>
<span id="L3262"><span class="lineNum">    3262</span>              :        *  @param __n  Number of characters in substring.</span>
<span id="L3263"><span class="lineNum">    3263</span>              :        *  @param __str  String to compare against.</span>
<span id="L3264"><span class="lineNum">    3264</span>              :        *  @return  Integer &lt; 0, 0, or &gt; 0.</span>
<span id="L3265"><span class="lineNum">    3265</span>              :        *</span>
<span id="L3266"><span class="lineNum">    3266</span>              :        *  Form the substring of this string from the @a __n characters</span>
<span id="L3267"><span class="lineNum">    3267</span>              :        *  starting at @a __pos.  Returns an integer &lt; 0 if the</span>
<span id="L3268"><span class="lineNum">    3268</span>              :        *  substring is ordered before @a __str, 0 if their values are</span>
<span id="L3269"><span class="lineNum">    3269</span>              :        *  equivalent, or &gt; 0 if the substring is ordered after @a</span>
<span id="L3270"><span class="lineNum">    3270</span>              :        *  __str.  Determines the effective length rlen of the strings</span>
<span id="L3271"><span class="lineNum">    3271</span>              :        *  to compare as the smallest of the length of the substring</span>
<span id="L3272"><span class="lineNum">    3272</span>              :        *  and @a __str.size().  The function then compares the two</span>
<span id="L3273"><span class="lineNum">    3273</span>              :        *  strings by calling</span>
<span id="L3274"><span class="lineNum">    3274</span>              :        *  traits::compare(substring.data(),str.data(),rlen).  If the</span>
<span id="L3275"><span class="lineNum">    3275</span>              :        *  result of the comparison is nonzero returns it, otherwise</span>
<span id="L3276"><span class="lineNum">    3276</span>              :        *  the shorter one is ordered first.</span>
<span id="L3277"><span class="lineNum">    3277</span>              :       */</span>
<span id="L3278"><span class="lineNum">    3278</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3279"><span class="lineNum">    3279</span>              :       int</span>
<span id="L3280"><span class="lineNum">    3280</span>              :       compare(size_type __pos, size_type __n, const basic_string&amp; __str) const</span>
<span id="L3281"><span class="lineNum">    3281</span>              :       {</span>
<span id="L3282"><span class="lineNum">    3282</span>              :         _M_check(__pos, &quot;basic_string::compare&quot;);</span>
<span id="L3283"><span class="lineNum">    3283</span>              :         __n = _M_limit(__pos, __n);</span>
<span id="L3284"><span class="lineNum">    3284</span>              :         const size_type __osize = __str.size();</span>
<span id="L3285"><span class="lineNum">    3285</span>              :         const size_type __len = std::min(__n, __osize);</span>
<span id="L3286"><span class="lineNum">    3286</span>              :         int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len);</span>
<span id="L3287"><span class="lineNum">    3287</span>              :         if (!__r)</span>
<span id="L3288"><span class="lineNum">    3288</span>              :           __r = _S_compare(__n, __osize);</span>
<span id="L3289"><span class="lineNum">    3289</span>              :         return __r;</span>
<span id="L3290"><span class="lineNum">    3290</span>              :       }</span>
<span id="L3291"><span class="lineNum">    3291</span>              : </span>
<span id="L3292"><span class="lineNum">    3292</span>              :       /**</span>
<span id="L3293"><span class="lineNum">    3293</span>              :        *  @brief  Compare substring to a substring.</span>
<span id="L3294"><span class="lineNum">    3294</span>              :        *  @param __pos1  Index of first character of substring.</span>
<span id="L3295"><span class="lineNum">    3295</span>              :        *  @param __n1  Number of characters in substring.</span>
<span id="L3296"><span class="lineNum">    3296</span>              :        *  @param __str  String to compare against.</span>
<span id="L3297"><span class="lineNum">    3297</span>              :        *  @param __pos2  Index of first character of substring of str.</span>
<span id="L3298"><span class="lineNum">    3298</span>              :        *  @param __n2  Number of characters in substring of str.</span>
<span id="L3299"><span class="lineNum">    3299</span>              :        *  @return  Integer &lt; 0, 0, or &gt; 0.</span>
<span id="L3300"><span class="lineNum">    3300</span>              :        *</span>
<span id="L3301"><span class="lineNum">    3301</span>              :        *  Form the substring of this string from the @a __n1</span>
<span id="L3302"><span class="lineNum">    3302</span>              :        *  characters starting at @a __pos1.  Form the substring of @a</span>
<span id="L3303"><span class="lineNum">    3303</span>              :        *  __str from the @a __n2 characters starting at @a __pos2.</span>
<span id="L3304"><span class="lineNum">    3304</span>              :        *  Returns an integer &lt; 0 if this substring is ordered before</span>
<span id="L3305"><span class="lineNum">    3305</span>              :        *  the substring of @a __str, 0 if their values are equivalent,</span>
<span id="L3306"><span class="lineNum">    3306</span>              :        *  or &gt; 0 if this substring is ordered after the substring of</span>
<span id="L3307"><span class="lineNum">    3307</span>              :        *  @a __str.  Determines the effective length rlen of the</span>
<span id="L3308"><span class="lineNum">    3308</span>              :        *  strings to compare as the smallest of the lengths of the</span>
<span id="L3309"><span class="lineNum">    3309</span>              :        *  substrings.  The function then compares the two strings by</span>
<span id="L3310"><span class="lineNum">    3310</span>              :        *  calling</span>
<span id="L3311"><span class="lineNum">    3311</span>              :        *  traits::compare(substring.data(),str.substr(pos2,n2).data(),rlen).</span>
<span id="L3312"><span class="lineNum">    3312</span>              :        *  If the result of the comparison is nonzero returns it,</span>
<span id="L3313"><span class="lineNum">    3313</span>              :        *  otherwise the shorter one is ordered first.</span>
<span id="L3314"><span class="lineNum">    3314</span>              :       */</span>
<span id="L3315"><span class="lineNum">    3315</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3316"><span class="lineNum">    3316</span>              :       int</span>
<span id="L3317"><span class="lineNum">    3317</span>              :       compare(size_type __pos1, size_type __n1, const basic_string&amp; __str,</span>
<span id="L3318"><span class="lineNum">    3318</span>              :               size_type __pos2, size_type __n2 = npos) const</span>
<span id="L3319"><span class="lineNum">    3319</span>              :       {</span>
<span id="L3320"><span class="lineNum">    3320</span>              :         _M_check(__pos1, &quot;basic_string::compare&quot;);</span>
<span id="L3321"><span class="lineNum">    3321</span>              :         __str._M_check(__pos2, &quot;basic_string::compare&quot;);</span>
<span id="L3322"><span class="lineNum">    3322</span>              :         __n1 = _M_limit(__pos1, __n1);</span>
<span id="L3323"><span class="lineNum">    3323</span>              :         __n2 = __str._M_limit(__pos2, __n2);</span>
<span id="L3324"><span class="lineNum">    3324</span>              :         const size_type __len = std::min(__n1, __n2);</span>
<span id="L3325"><span class="lineNum">    3325</span>              :         int __r = traits_type::compare(_M_data() + __pos1,</span>
<span id="L3326"><span class="lineNum">    3326</span>              :                                        __str.data() + __pos2, __len);</span>
<span id="L3327"><span class="lineNum">    3327</span>              :         if (!__r)</span>
<span id="L3328"><span class="lineNum">    3328</span>              :           __r = _S_compare(__n1, __n2);</span>
<span id="L3329"><span class="lineNum">    3329</span>              :         return __r;</span>
<span id="L3330"><span class="lineNum">    3330</span>              :       }</span>
<span id="L3331"><span class="lineNum">    3331</span>              : </span>
<span id="L3332"><span class="lineNum">    3332</span>              :       /**</span>
<span id="L3333"><span class="lineNum">    3333</span>              :        *  @brief  Compare to a C string.</span>
<span id="L3334"><span class="lineNum">    3334</span>              :        *  @param __s  C string to compare against.</span>
<span id="L3335"><span class="lineNum">    3335</span>              :        *  @return  Integer &lt; 0, 0, or &gt; 0.</span>
<span id="L3336"><span class="lineNum">    3336</span>              :        *</span>
<span id="L3337"><span class="lineNum">    3337</span>              :        *  Returns an integer &lt; 0 if this string is ordered before @a __s, 0 if</span>
<span id="L3338"><span class="lineNum">    3338</span>              :        *  their values are equivalent, or &gt; 0 if this string is ordered after</span>
<span id="L3339"><span class="lineNum">    3339</span>              :        *  @a __s.  Determines the effective length rlen of the strings to</span>
<span id="L3340"><span class="lineNum">    3340</span>              :        *  compare as the smallest of size() and the length of a string</span>
<span id="L3341"><span class="lineNum">    3341</span>              :        *  constructed from @a __s.  The function then compares the two strings</span>
<span id="L3342"><span class="lineNum">    3342</span>              :        *  by calling traits::compare(data(),s,rlen).  If the result of the</span>
<span id="L3343"><span class="lineNum">    3343</span>              :        *  comparison is nonzero returns it, otherwise the shorter one is</span>
<span id="L3344"><span class="lineNum">    3344</span>              :        *  ordered first.</span>
<span id="L3345"><span class="lineNum">    3345</span>              :       */</span>
<span id="L3346"><span class="lineNum">    3346</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3347"><span class="lineNum">    3347</span>              :       int</span>
<span id="L3348"><span class="lineNum">    3348</span>              :       compare(const _CharT* __s) const _GLIBCXX_NOEXCEPT</span>
<span id="L3349"><span class="lineNum">    3349</span>              :       {</span>
<span id="L3350"><span class="lineNum">    3350</span>              :         __glibcxx_requires_string(__s);</span>
<span id="L3351"><span class="lineNum">    3351</span>              :         const size_type __size = this-&gt;size();</span>
<span id="L3352"><span class="lineNum">    3352</span>              :         const size_type __osize = traits_type::length(__s);</span>
<span id="L3353"><span class="lineNum">    3353</span>              :         const size_type __len = std::min(__size, __osize);</span>
<span id="L3354"><span class="lineNum">    3354</span>              :         int __r = traits_type::compare(_M_data(), __s, __len);</span>
<span id="L3355"><span class="lineNum">    3355</span>              :         if (!__r)</span>
<span id="L3356"><span class="lineNum">    3356</span>              :           __r = _S_compare(__size, __osize);</span>
<span id="L3357"><span class="lineNum">    3357</span>              :         return __r;</span>
<span id="L3358"><span class="lineNum">    3358</span>              :       }</span>
<span id="L3359"><span class="lineNum">    3359</span>              : </span>
<span id="L3360"><span class="lineNum">    3360</span>              :       // _GLIBCXX_RESOLVE_LIB_DEFECTS</span>
<span id="L3361"><span class="lineNum">    3361</span>              :       // 5 String::compare specification questionable</span>
<span id="L3362"><span class="lineNum">    3362</span>              :       /**</span>
<span id="L3363"><span class="lineNum">    3363</span>              :        *  @brief  Compare substring to a C string.</span>
<span id="L3364"><span class="lineNum">    3364</span>              :        *  @param __pos  Index of first character of substring.</span>
<span id="L3365"><span class="lineNum">    3365</span>              :        *  @param __n1  Number of characters in substring.</span>
<span id="L3366"><span class="lineNum">    3366</span>              :        *  @param __s  C string to compare against.</span>
<span id="L3367"><span class="lineNum">    3367</span>              :        *  @return  Integer &lt; 0, 0, or &gt; 0.</span>
<span id="L3368"><span class="lineNum">    3368</span>              :        *</span>
<span id="L3369"><span class="lineNum">    3369</span>              :        *  Form the substring of this string from the @a __n1</span>
<span id="L3370"><span class="lineNum">    3370</span>              :        *  characters starting at @a pos.  Returns an integer &lt; 0 if</span>
<span id="L3371"><span class="lineNum">    3371</span>              :        *  the substring is ordered before @a __s, 0 if their values</span>
<span id="L3372"><span class="lineNum">    3372</span>              :        *  are equivalent, or &gt; 0 if the substring is ordered after @a</span>
<span id="L3373"><span class="lineNum">    3373</span>              :        *  __s.  Determines the effective length rlen of the strings to</span>
<span id="L3374"><span class="lineNum">    3374</span>              :        *  compare as the smallest of the length of the substring and</span>
<span id="L3375"><span class="lineNum">    3375</span>              :        *  the length of a string constructed from @a __s.  The</span>
<span id="L3376"><span class="lineNum">    3376</span>              :        *  function then compares the two string by calling</span>
<span id="L3377"><span class="lineNum">    3377</span>              :        *  traits::compare(substring.data(),__s,rlen).  If the result of</span>
<span id="L3378"><span class="lineNum">    3378</span>              :        *  the comparison is nonzero returns it, otherwise the shorter</span>
<span id="L3379"><span class="lineNum">    3379</span>              :        *  one is ordered first.</span>
<span id="L3380"><span class="lineNum">    3380</span>              :       */</span>
<span id="L3381"><span class="lineNum">    3381</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3382"><span class="lineNum">    3382</span>              :       int</span>
<span id="L3383"><span class="lineNum">    3383</span>              :       compare(size_type __pos, size_type __n1, const _CharT* __s) const</span>
<span id="L3384"><span class="lineNum">    3384</span>              :       {</span>
<span id="L3385"><span class="lineNum">    3385</span>              :         __glibcxx_requires_string(__s);</span>
<span id="L3386"><span class="lineNum">    3386</span>              :         _M_check(__pos, &quot;basic_string::compare&quot;);</span>
<span id="L3387"><span class="lineNum">    3387</span>              :         __n1 = _M_limit(__pos, __n1);</span>
<span id="L3388"><span class="lineNum">    3388</span>              :         const size_type __osize = traits_type::length(__s);</span>
<span id="L3389"><span class="lineNum">    3389</span>              :         const size_type __len = std::min(__n1, __osize);</span>
<span id="L3390"><span class="lineNum">    3390</span>              :         int __r = traits_type::compare(_M_data() + __pos, __s, __len);</span>
<span id="L3391"><span class="lineNum">    3391</span>              :         if (!__r)</span>
<span id="L3392"><span class="lineNum">    3392</span>              :           __r = _S_compare(__n1, __osize);</span>
<span id="L3393"><span class="lineNum">    3393</span>              :         return __r;</span>
<span id="L3394"><span class="lineNum">    3394</span>              :       }</span>
<span id="L3395"><span class="lineNum">    3395</span>              : </span>
<span id="L3396"><span class="lineNum">    3396</span>              :       /**</span>
<span id="L3397"><span class="lineNum">    3397</span>              :        *  @brief  Compare substring against a character %array.</span>
<span id="L3398"><span class="lineNum">    3398</span>              :        *  @param __pos  Index of first character of substring.</span>
<span id="L3399"><span class="lineNum">    3399</span>              :        *  @param __n1  Number of characters in substring.</span>
<span id="L3400"><span class="lineNum">    3400</span>              :        *  @param __s  character %array to compare against.</span>
<span id="L3401"><span class="lineNum">    3401</span>              :        *  @param __n2  Number of characters of s.</span>
<span id="L3402"><span class="lineNum">    3402</span>              :        *  @return  Integer &lt; 0, 0, or &gt; 0.</span>
<span id="L3403"><span class="lineNum">    3403</span>              :        *</span>
<span id="L3404"><span class="lineNum">    3404</span>              :        *  Form the substring of this string from the @a __n1</span>
<span id="L3405"><span class="lineNum">    3405</span>              :        *  characters starting at @a __pos.  Form a string from the</span>
<span id="L3406"><span class="lineNum">    3406</span>              :        *  first @a __n2 characters of @a __s.  Returns an integer &lt; 0</span>
<span id="L3407"><span class="lineNum">    3407</span>              :        *  if this substring is ordered before the string from @a __s,</span>
<span id="L3408"><span class="lineNum">    3408</span>              :        *  0 if their values are equivalent, or &gt; 0 if this substring</span>
<span id="L3409"><span class="lineNum">    3409</span>              :        *  is ordered after the string from @a __s.  Determines the</span>
<span id="L3410"><span class="lineNum">    3410</span>              :        *  effective length rlen of the strings to compare as the</span>
<span id="L3411"><span class="lineNum">    3411</span>              :        *  smallest of the length of the substring and @a __n2.  The</span>
<span id="L3412"><span class="lineNum">    3412</span>              :        *  function then compares the two strings by calling</span>
<span id="L3413"><span class="lineNum">    3413</span>              :        *  traits::compare(substring.data(),s,rlen).  If the result of</span>
<span id="L3414"><span class="lineNum">    3414</span>              :        *  the comparison is nonzero returns it, otherwise the shorter</span>
<span id="L3415"><span class="lineNum">    3415</span>              :        *  one is ordered first.</span>
<span id="L3416"><span class="lineNum">    3416</span>              :        *</span>
<span id="L3417"><span class="lineNum">    3417</span>              :        *  NB: s must have at least n2 characters, &amp;apos;\\0&amp;apos; has</span>
<span id="L3418"><span class="lineNum">    3418</span>              :        *  no special meaning.</span>
<span id="L3419"><span class="lineNum">    3419</span>              :       */</span>
<span id="L3420"><span class="lineNum">    3420</span>              :       _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3421"><span class="lineNum">    3421</span>              :       int</span>
<span id="L3422"><span class="lineNum">    3422</span>              :       compare(size_type __pos, size_type __n1, const _CharT* __s,</span>
<span id="L3423"><span class="lineNum">    3423</span>              :               size_type __n2) const</span>
<span id="L3424"><span class="lineNum">    3424</span>              :       {</span>
<span id="L3425"><span class="lineNum">    3425</span>              :         __glibcxx_requires_string_len(__s, __n2);</span>
<span id="L3426"><span class="lineNum">    3426</span>              :         _M_check(__pos, &quot;basic_string::compare&quot;);</span>
<span id="L3427"><span class="lineNum">    3427</span>              :         __n1 = _M_limit(__pos, __n1);</span>
<span id="L3428"><span class="lineNum">    3428</span>              :         const size_type __len = std::min(__n1, __n2);</span>
<span id="L3429"><span class="lineNum">    3429</span>              :         int __r = traits_type::compare(_M_data() + __pos, __s, __len);</span>
<span id="L3430"><span class="lineNum">    3430</span>              :         if (!__r)</span>
<span id="L3431"><span class="lineNum">    3431</span>              :           __r = _S_compare(__n1, __n2);</span>
<span id="L3432"><span class="lineNum">    3432</span>              :         return __r;</span>
<span id="L3433"><span class="lineNum">    3433</span>              :       }</span>
<span id="L3434"><span class="lineNum">    3434</span>              : </span>
<span id="L3435"><span class="lineNum">    3435</span>              : #if __cplusplus &gt;= 202002L</span>
<span id="L3436"><span class="lineNum">    3436</span>              :       [[nodiscard]]</span>
<span id="L3437"><span class="lineNum">    3437</span>              :       constexpr bool</span>
<span id="L3438"><span class="lineNum">    3438</span>              :       starts_with(basic_string_view&lt;_CharT, _Traits&gt; __x) const noexcept</span>
<span id="L3439"><span class="lineNum">    3439</span>              :       { return __sv_type(this-&gt;data(), this-&gt;size()).starts_with(__x); }</span>
<span id="L3440"><span class="lineNum">    3440</span>              : </span>
<span id="L3441"><span class="lineNum">    3441</span>              :       [[nodiscard]]</span>
<span id="L3442"><span class="lineNum">    3442</span>              :       constexpr bool</span>
<span id="L3443"><span class="lineNum">    3443</span>              :       starts_with(_CharT __x) const noexcept</span>
<span id="L3444"><span class="lineNum">    3444</span>              :       { return __sv_type(this-&gt;data(), this-&gt;size()).starts_with(__x); }</span>
<span id="L3445"><span class="lineNum">    3445</span>              : </span>
<span id="L3446"><span class="lineNum">    3446</span>              :       [[nodiscard, __gnu__::__nonnull__]]</span>
<span id="L3447"><span class="lineNum">    3447</span>              :       constexpr bool</span>
<span id="L3448"><span class="lineNum">    3448</span>              :       starts_with(const _CharT* __x) const noexcept</span>
<span id="L3449"><span class="lineNum">    3449</span>              :       { return __sv_type(this-&gt;data(), this-&gt;size()).starts_with(__x); }</span>
<span id="L3450"><span class="lineNum">    3450</span>              : </span>
<span id="L3451"><span class="lineNum">    3451</span>              :       [[nodiscard]]</span>
<span id="L3452"><span class="lineNum">    3452</span>              :       constexpr bool</span>
<span id="L3453"><span class="lineNum">    3453</span>              :       ends_with(basic_string_view&lt;_CharT, _Traits&gt; __x) const noexcept</span>
<span id="L3454"><span class="lineNum">    3454</span>              :       { return __sv_type(this-&gt;data(), this-&gt;size()).ends_with(__x); }</span>
<span id="L3455"><span class="lineNum">    3455</span>              : </span>
<span id="L3456"><span class="lineNum">    3456</span>              :       [[nodiscard]]</span>
<span id="L3457"><span class="lineNum">    3457</span>              :       constexpr bool</span>
<span id="L3458"><span class="lineNum">    3458</span>              :       ends_with(_CharT __x) const noexcept</span>
<span id="L3459"><span class="lineNum">    3459</span>              :       { return __sv_type(this-&gt;data(), this-&gt;size()).ends_with(__x); }</span>
<span id="L3460"><span class="lineNum">    3460</span>              : </span>
<span id="L3461"><span class="lineNum">    3461</span>              :       [[nodiscard, __gnu__::__nonnull__]]</span>
<span id="L3462"><span class="lineNum">    3462</span>              :       constexpr bool</span>
<span id="L3463"><span class="lineNum">    3463</span>              :       ends_with(const _CharT* __x) const noexcept</span>
<span id="L3464"><span class="lineNum">    3464</span>              :       { return __sv_type(this-&gt;data(), this-&gt;size()).ends_with(__x); }</span>
<span id="L3465"><span class="lineNum">    3465</span>              : #endif // C++20</span>
<span id="L3466"><span class="lineNum">    3466</span>              : </span>
<span id="L3467"><span class="lineNum">    3467</span>              : #if __cplusplus &gt; 202002L</span>
<span id="L3468"><span class="lineNum">    3468</span>              :       [[nodiscard]]</span>
<span id="L3469"><span class="lineNum">    3469</span>              :       constexpr bool</span>
<span id="L3470"><span class="lineNum">    3470</span>              :       contains(basic_string_view&lt;_CharT, _Traits&gt; __x) const noexcept</span>
<span id="L3471"><span class="lineNum">    3471</span>              :       { return __sv_type(this-&gt;data(), this-&gt;size()).contains(__x); }</span>
<span id="L3472"><span class="lineNum">    3472</span>              : </span>
<span id="L3473"><span class="lineNum">    3473</span>              :       [[nodiscard]]</span>
<span id="L3474"><span class="lineNum">    3474</span>              :       constexpr bool</span>
<span id="L3475"><span class="lineNum">    3475</span>              :       contains(_CharT __x) const noexcept</span>
<span id="L3476"><span class="lineNum">    3476</span>              :       { return __sv_type(this-&gt;data(), this-&gt;size()).contains(__x); }</span>
<span id="L3477"><span class="lineNum">    3477</span>              : </span>
<span id="L3478"><span class="lineNum">    3478</span>              :       [[nodiscard, __gnu__::__nonnull__]]</span>
<span id="L3479"><span class="lineNum">    3479</span>              :       constexpr bool</span>
<span id="L3480"><span class="lineNum">    3480</span>              :       contains(const _CharT* __x) const noexcept</span>
<span id="L3481"><span class="lineNum">    3481</span>              :       { return __sv_type(this-&gt;data(), this-&gt;size()).contains(__x); }</span>
<span id="L3482"><span class="lineNum">    3482</span>              : #endif // C++23</span>
<span id="L3483"><span class="lineNum">    3483</span>              : </span>
<span id="L3484"><span class="lineNum">    3484</span>              :       // Allow basic_stringbuf::__xfer_bufptrs to call _M_length:</span>
<span id="L3485"><span class="lineNum">    3485</span>              :       template&lt;typename, typename, typename&gt; friend class basic_stringbuf;</span>
<span id="L3486"><span class="lineNum">    3486</span>              :     };</span>
<span id="L3487"><span class="lineNum">    3487</span>              : _GLIBCXX_END_NAMESPACE_CXX11</span>
<span id="L3488"><span class="lineNum">    3488</span>              : _GLIBCXX_END_NAMESPACE_VERSION</span>
<span id="L3489"><span class="lineNum">    3489</span>              : } // namespace std</span>
<span id="L3490"><span class="lineNum">    3490</span>              : #endif  // _GLIBCXX_USE_CXX11_ABI</span>
<span id="L3491"><span class="lineNum">    3491</span>              : </span>
<span id="L3492"><span class="lineNum">    3492</span>              : namespace std _GLIBCXX_VISIBILITY(default)</span>
<span id="L3493"><span class="lineNum">    3493</span>              : {</span>
<span id="L3494"><span class="lineNum">    3494</span>              : _GLIBCXX_BEGIN_NAMESPACE_VERSION</span>
<span id="L3495"><span class="lineNum">    3495</span>              : </span>
<span id="L3496"><span class="lineNum">    3496</span>              : #if __cpp_deduction_guides &gt;= 201606</span>
<span id="L3497"><span class="lineNum">    3497</span>              : _GLIBCXX_BEGIN_NAMESPACE_CXX11</span>
<span id="L3498"><span class="lineNum">    3498</span>              :   template&lt;typename _InputIterator, typename _CharT</span>
<span id="L3499"><span class="lineNum">    3499</span>              :              = typename iterator_traits&lt;_InputIterator&gt;::value_type,</span>
<span id="L3500"><span class="lineNum">    3500</span>              :            typename _Allocator = allocator&lt;_CharT&gt;,</span>
<span id="L3501"><span class="lineNum">    3501</span>              :            typename = _RequireInputIter&lt;_InputIterator&gt;,</span>
<span id="L3502"><span class="lineNum">    3502</span>              :            typename = _RequireAllocator&lt;_Allocator&gt;&gt;</span>
<span id="L3503"><span class="lineNum">    3503</span>              :     basic_string(_InputIterator, _InputIterator, _Allocator = _Allocator())</span>
<span id="L3504"><span class="lineNum">    3504</span>              :       -&gt; basic_string&lt;_CharT, char_traits&lt;_CharT&gt;, _Allocator&gt;;</span>
<span id="L3505"><span class="lineNum">    3505</span>              : </span>
<span id="L3506"><span class="lineNum">    3506</span>              :   // _GLIBCXX_RESOLVE_LIB_DEFECTS</span>
<span id="L3507"><span class="lineNum">    3507</span>              :   // 3075. basic_string needs deduction guides from basic_string_view</span>
<span id="L3508"><span class="lineNum">    3508</span>              :   template&lt;typename _CharT, typename _Traits,</span>
<span id="L3509"><span class="lineNum">    3509</span>              :            typename _Allocator = allocator&lt;_CharT&gt;,</span>
<span id="L3510"><span class="lineNum">    3510</span>              :            typename = _RequireAllocator&lt;_Allocator&gt;&gt;</span>
<span id="L3511"><span class="lineNum">    3511</span>              :     basic_string(basic_string_view&lt;_CharT, _Traits&gt;, const _Allocator&amp; = _Allocator())</span>
<span id="L3512"><span class="lineNum">    3512</span>              :       -&gt; basic_string&lt;_CharT, _Traits, _Allocator&gt;;</span>
<span id="L3513"><span class="lineNum">    3513</span>              : </span>
<span id="L3514"><span class="lineNum">    3514</span>              :   template&lt;typename _CharT, typename _Traits,</span>
<span id="L3515"><span class="lineNum">    3515</span>              :            typename _Allocator = allocator&lt;_CharT&gt;,</span>
<span id="L3516"><span class="lineNum">    3516</span>              :            typename = _RequireAllocator&lt;_Allocator&gt;&gt;</span>
<span id="L3517"><span class="lineNum">    3517</span>              :     basic_string(basic_string_view&lt;_CharT, _Traits&gt;,</span>
<span id="L3518"><span class="lineNum">    3518</span>              :                  typename basic_string&lt;_CharT, _Traits, _Allocator&gt;::size_type,</span>
<span id="L3519"><span class="lineNum">    3519</span>              :                  typename basic_string&lt;_CharT, _Traits, _Allocator&gt;::size_type,</span>
<span id="L3520"><span class="lineNum">    3520</span>              :                  const _Allocator&amp; = _Allocator())</span>
<span id="L3521"><span class="lineNum">    3521</span>              :       -&gt; basic_string&lt;_CharT, _Traits, _Allocator&gt;;</span>
<span id="L3522"><span class="lineNum">    3522</span>              : _GLIBCXX_END_NAMESPACE_CXX11</span>
<span id="L3523"><span class="lineNum">    3523</span>              : #endif</span>
<span id="L3524"><span class="lineNum">    3524</span>              : </span>
<span id="L3525"><span class="lineNum">    3525</span>              :   template&lt;typename _Str&gt;</span>
<span id="L3526"><span class="lineNum">    3526</span>              :     _GLIBCXX20_CONSTEXPR</span>
<span id="L3527"><span class="lineNum">    3527</span>              :     inline _Str</span>
<span id="L3528"><span class="lineNum">    3528</span> <span class="tlaGNC">          11 :     __str_concat(typename _Str::value_type const* __lhs,</span></span>
<span id="L3529"><span class="lineNum">    3529</span>              :                  typename _Str::size_type __lhs_len,</span>
<span id="L3530"><span class="lineNum">    3530</span>              :                  typename _Str::value_type const* __rhs,</span>
<span id="L3531"><span class="lineNum">    3531</span>              :                  typename _Str::size_type __rhs_len,</span>
<span id="L3532"><span class="lineNum">    3532</span>              :                  typename _Str::allocator_type const&amp; __a)</span>
<span id="L3533"><span class="lineNum">    3533</span>              :     {</span>
<span id="L3534"><span class="lineNum">    3534</span>              :       typedef typename _Str::allocator_type allocator_type;</span>
<span id="L3535"><span class="lineNum">    3535</span>              :       typedef __gnu_cxx::__alloc_traits&lt;allocator_type&gt; _Alloc_traits;</span>
<span id="L3536"><span class="lineNum">    3536</span> <span class="tlaGNC">          11 :       _Str __str(_Alloc_traits::_S_select_on_copy(__a));</span></span>
<span id="L3537"><span class="lineNum">    3537</span> <span class="tlaGNC">          11 :       __str.reserve(__lhs_len + __rhs_len);</span></span>
<span id="L3538"><span class="lineNum">    3538</span> <span class="tlaGNC">          11 :       __str.append(__lhs, __lhs_len);</span></span>
<span id="L3539"><span class="lineNum">    3539</span> <span class="tlaGNC">          11 :       __str.append(__rhs, __rhs_len);</span></span>
<span id="L3540"><span class="lineNum">    3540</span> <span class="tlaGNC">          11 :       return __str;</span></span>
<span id="L3541"><span class="lineNum">    3541</span> <span class="tlaUNC tlaBgUNC">           0 :     }</span></span>
<span id="L3542"><span class="lineNum">    3542</span>              : </span>
<span id="L3543"><span class="lineNum">    3543</span>              :   // operator+</span>
<span id="L3544"><span class="lineNum">    3544</span>              :   /**</span>
<span id="L3545"><span class="lineNum">    3545</span>              :    *  @brief  Concatenate two strings.</span>
<span id="L3546"><span class="lineNum">    3546</span>              :    *  @param __lhs  First string.</span>
<span id="L3547"><span class="lineNum">    3547</span>              :    *  @param __rhs  Last string.</span>
<span id="L3548"><span class="lineNum">    3548</span>              :    *  @return  New string with value of @a __lhs followed by @a __rhs.</span>
<span id="L3549"><span class="lineNum">    3549</span>              :    */</span>
<span id="L3550"><span class="lineNum">    3550</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3551"><span class="lineNum">    3551</span>              :     _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3552"><span class="lineNum">    3552</span>              :     inline basic_string&lt;_CharT, _Traits, _Alloc&gt;</span>
<span id="L3553"><span class="lineNum">    3553</span>              :     operator+(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span>
<span id="L3554"><span class="lineNum">    3554</span>              :               const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __rhs)</span>
<span id="L3555"><span class="lineNum">    3555</span>              :     {</span>
<span id="L3556"><span class="lineNum">    3556</span>              :       typedef basic_string&lt;_CharT, _Traits, _Alloc&gt; _Str;</span>
<span id="L3557"><span class="lineNum">    3557</span>              :       return std::__str_concat&lt;_Str&gt;(__lhs.c_str(), __lhs.size(),</span>
<span id="L3558"><span class="lineNum">    3558</span>              :                                      __rhs.c_str(), __rhs.size(),</span>
<span id="L3559"><span class="lineNum">    3559</span>              :                                      __lhs.get_allocator());</span>
<span id="L3560"><span class="lineNum">    3560</span>              :     }</span>
<span id="L3561"><span class="lineNum">    3561</span>              : </span>
<span id="L3562"><span class="lineNum">    3562</span>              :   /**</span>
<span id="L3563"><span class="lineNum">    3563</span>              :    *  @brief  Concatenate C string and string.</span>
<span id="L3564"><span class="lineNum">    3564</span>              :    *  @param __lhs  First string.</span>
<span id="L3565"><span class="lineNum">    3565</span>              :    *  @param __rhs  Last string.</span>
<span id="L3566"><span class="lineNum">    3566</span>              :    *  @return  New string with value of @a __lhs followed by @a __rhs.</span>
<span id="L3567"><span class="lineNum">    3567</span>              :    */</span>
<span id="L3568"><span class="lineNum">    3568</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3569"><span class="lineNum">    3569</span>              :     _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3570"><span class="lineNum">    3570</span>              :     inline basic_string&lt;_CharT,_Traits,_Alloc&gt;</span>
<span id="L3571"><span class="lineNum">    3571</span> <span class="tlaGNC tlaBgGNC">          11 :     operator+(const _CharT* __lhs,</span></span>
<span id="L3572"><span class="lineNum">    3572</span>              :               const basic_string&lt;_CharT,_Traits,_Alloc&gt;&amp; __rhs)</span>
<span id="L3573"><span class="lineNum">    3573</span>              :     {</span>
<span id="L3574"><span class="lineNum">    3574</span>              :       __glibcxx_requires_string(__lhs);</span>
<span id="L3575"><span class="lineNum">    3575</span>              :       typedef basic_string&lt;_CharT, _Traits, _Alloc&gt; _Str;</span>
<span id="L3576"><span class="lineNum">    3576</span>              :       return std::__str_concat&lt;_Str&gt;(__lhs, _Traits::length(__lhs),</span>
<span id="L3577"><span class="lineNum">    3577</span>              :                                      __rhs.c_str(), __rhs.size(),</span>
<span id="L3578"><span class="lineNum">    3578</span> <span class="tlaGNC">          22 :                                      __rhs.get_allocator());</span></span>
<span id="L3579"><span class="lineNum">    3579</span>              :     }</span>
<span id="L3580"><span class="lineNum">    3580</span>              : </span>
<span id="L3581"><span class="lineNum">    3581</span>              :   /**</span>
<span id="L3582"><span class="lineNum">    3582</span>              :    *  @brief  Concatenate character and string.</span>
<span id="L3583"><span class="lineNum">    3583</span>              :    *  @param __lhs  First string.</span>
<span id="L3584"><span class="lineNum">    3584</span>              :    *  @param __rhs  Last string.</span>
<span id="L3585"><span class="lineNum">    3585</span>              :    *  @return  New string with @a __lhs followed by @a __rhs.</span>
<span id="L3586"><span class="lineNum">    3586</span>              :    */</span>
<span id="L3587"><span class="lineNum">    3587</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3588"><span class="lineNum">    3588</span>              :     _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3589"><span class="lineNum">    3589</span>              :     inline basic_string&lt;_CharT,_Traits,_Alloc&gt;</span>
<span id="L3590"><span class="lineNum">    3590</span>              :     operator+(_CharT __lhs, const basic_string&lt;_CharT,_Traits,_Alloc&gt;&amp; __rhs)</span>
<span id="L3591"><span class="lineNum">    3591</span>              :     {</span>
<span id="L3592"><span class="lineNum">    3592</span>              :       typedef basic_string&lt;_CharT, _Traits, _Alloc&gt; _Str;</span>
<span id="L3593"><span class="lineNum">    3593</span>              :       return std::__str_concat&lt;_Str&gt;(__builtin_addressof(__lhs), 1,</span>
<span id="L3594"><span class="lineNum">    3594</span>              :                                      __rhs.c_str(), __rhs.size(),</span>
<span id="L3595"><span class="lineNum">    3595</span>              :                                      __rhs.get_allocator());</span>
<span id="L3596"><span class="lineNum">    3596</span>              :     }</span>
<span id="L3597"><span class="lineNum">    3597</span>              : </span>
<span id="L3598"><span class="lineNum">    3598</span>              :   /**</span>
<span id="L3599"><span class="lineNum">    3599</span>              :    *  @brief  Concatenate string and C string.</span>
<span id="L3600"><span class="lineNum">    3600</span>              :    *  @param __lhs  First string.</span>
<span id="L3601"><span class="lineNum">    3601</span>              :    *  @param __rhs  Last string.</span>
<span id="L3602"><span class="lineNum">    3602</span>              :    *  @return  New string with @a __lhs followed by @a __rhs.</span>
<span id="L3603"><span class="lineNum">    3603</span>              :    */</span>
<span id="L3604"><span class="lineNum">    3604</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3605"><span class="lineNum">    3605</span>              :     _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3606"><span class="lineNum">    3606</span>              :     inline basic_string&lt;_CharT, _Traits, _Alloc&gt;</span>
<span id="L3607"><span class="lineNum">    3607</span> <span class="tlaUNC tlaBgUNC">           0 :     operator+(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span></span>
<span id="L3608"><span class="lineNum">    3608</span>              :               const _CharT* __rhs)</span>
<span id="L3609"><span class="lineNum">    3609</span>              :     {</span>
<span id="L3610"><span class="lineNum">    3610</span>              :       __glibcxx_requires_string(__rhs);</span>
<span id="L3611"><span class="lineNum">    3611</span>              :       typedef basic_string&lt;_CharT, _Traits, _Alloc&gt; _Str;</span>
<span id="L3612"><span class="lineNum">    3612</span>              :       return std::__str_concat&lt;_Str&gt;(__lhs.c_str(), __lhs.size(),</span>
<span id="L3613"><span class="lineNum">    3613</span>              :                                      __rhs, _Traits::length(__rhs),</span>
<span id="L3614"><span class="lineNum">    3614</span> <span class="tlaUNC">           0 :                                      __lhs.get_allocator());</span></span>
<span id="L3615"><span class="lineNum">    3615</span>              :     }</span>
<span id="L3616"><span class="lineNum">    3616</span>              :   /**</span>
<span id="L3617"><span class="lineNum">    3617</span>              :    *  @brief  Concatenate string and character.</span>
<span id="L3618"><span class="lineNum">    3618</span>              :    *  @param __lhs  First string.</span>
<span id="L3619"><span class="lineNum">    3619</span>              :    *  @param __rhs  Last string.</span>
<span id="L3620"><span class="lineNum">    3620</span>              :    *  @return  New string with @a __lhs followed by @a __rhs.</span>
<span id="L3621"><span class="lineNum">    3621</span>              :    */</span>
<span id="L3622"><span class="lineNum">    3622</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3623"><span class="lineNum">    3623</span>              :     _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3624"><span class="lineNum">    3624</span>              :     inline basic_string&lt;_CharT, _Traits, _Alloc&gt;</span>
<span id="L3625"><span class="lineNum">    3625</span>              :     operator+(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs, _CharT __rhs)</span>
<span id="L3626"><span class="lineNum">    3626</span>              :     {</span>
<span id="L3627"><span class="lineNum">    3627</span>              :       typedef basic_string&lt;_CharT, _Traits, _Alloc&gt; _Str;</span>
<span id="L3628"><span class="lineNum">    3628</span>              :       return std::__str_concat&lt;_Str&gt;(__lhs.c_str(), __lhs.size(),</span>
<span id="L3629"><span class="lineNum">    3629</span>              :                                      __builtin_addressof(__rhs), 1,</span>
<span id="L3630"><span class="lineNum">    3630</span>              :                                      __lhs.get_allocator());</span>
<span id="L3631"><span class="lineNum">    3631</span>              :     }</span>
<span id="L3632"><span class="lineNum">    3632</span>              : </span>
<span id="L3633"><span class="lineNum">    3633</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L3634"><span class="lineNum">    3634</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3635"><span class="lineNum">    3635</span>              :     _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3636"><span class="lineNum">    3636</span>              :     inline basic_string&lt;_CharT, _Traits, _Alloc&gt;</span>
<span id="L3637"><span class="lineNum">    3637</span>              :     operator+(basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;&amp; __lhs,</span>
<span id="L3638"><span class="lineNum">    3638</span>              :               const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __rhs)</span>
<span id="L3639"><span class="lineNum">    3639</span>              :     { return std::move(__lhs.append(__rhs)); }</span>
<span id="L3640"><span class="lineNum">    3640</span>              : </span>
<span id="L3641"><span class="lineNum">    3641</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3642"><span class="lineNum">    3642</span>              :     _GLIBCXX20_CONSTEXPR</span>
<span id="L3643"><span class="lineNum">    3643</span>              :     inline basic_string&lt;_CharT, _Traits, _Alloc&gt;</span>
<span id="L3644"><span class="lineNum">    3644</span>              :     operator+(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span>
<span id="L3645"><span class="lineNum">    3645</span>              :               basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;&amp; __rhs)</span>
<span id="L3646"><span class="lineNum">    3646</span>              :     { return std::move(__rhs.insert(0, __lhs)); }</span>
<span id="L3647"><span class="lineNum">    3647</span>              : </span>
<span id="L3648"><span class="lineNum">    3648</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3649"><span class="lineNum">    3649</span>              :     _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3650"><span class="lineNum">    3650</span>              :     inline basic_string&lt;_CharT, _Traits, _Alloc&gt;</span>
<span id="L3651"><span class="lineNum">    3651</span>              :     operator+(basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;&amp; __lhs,</span>
<span id="L3652"><span class="lineNum">    3652</span>              :               basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;&amp; __rhs)</span>
<span id="L3653"><span class="lineNum">    3653</span>              :     {</span>
<span id="L3654"><span class="lineNum">    3654</span>              : #if _GLIBCXX_USE_CXX11_ABI</span>
<span id="L3655"><span class="lineNum">    3655</span>              :       using _Alloc_traits = allocator_traits&lt;_Alloc&gt;;</span>
<span id="L3656"><span class="lineNum">    3656</span>              :       bool __use_rhs = false;</span>
<span id="L3657"><span class="lineNum">    3657</span>              :       if _GLIBCXX17_CONSTEXPR (typename _Alloc_traits::is_always_equal{})</span>
<span id="L3658"><span class="lineNum">    3658</span>              :         __use_rhs = true;</span>
<span id="L3659"><span class="lineNum">    3659</span>              :       else if (__lhs.get_allocator() == __rhs.get_allocator())</span>
<span id="L3660"><span class="lineNum">    3660</span>              :         __use_rhs = true;</span>
<span id="L3661"><span class="lineNum">    3661</span>              :       if (__use_rhs)</span>
<span id="L3662"><span class="lineNum">    3662</span>              : #endif</span>
<span id="L3663"><span class="lineNum">    3663</span>              :         {</span>
<span id="L3664"><span class="lineNum">    3664</span>              :           const auto __size = __lhs.size() + __rhs.size();</span>
<span id="L3665"><span class="lineNum">    3665</span>              :           if (__size &gt; __lhs.capacity() &amp;&amp; __size &lt;= __rhs.capacity())</span>
<span id="L3666"><span class="lineNum">    3666</span>              :             return std::move(__rhs.insert(0, __lhs));</span>
<span id="L3667"><span class="lineNum">    3667</span>              :         }</span>
<span id="L3668"><span class="lineNum">    3668</span>              :       return std::move(__lhs.append(__rhs));</span>
<span id="L3669"><span class="lineNum">    3669</span>              :     }</span>
<span id="L3670"><span class="lineNum">    3670</span>              : </span>
<span id="L3671"><span class="lineNum">    3671</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3672"><span class="lineNum">    3672</span>              :     _GLIBCXX_NODISCARD _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3673"><span class="lineNum">    3673</span>              :     inline basic_string&lt;_CharT, _Traits, _Alloc&gt;</span>
<span id="L3674"><span class="lineNum">    3674</span>              :     operator+(const _CharT* __lhs,</span>
<span id="L3675"><span class="lineNum">    3675</span>              :               basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;&amp; __rhs)</span>
<span id="L3676"><span class="lineNum">    3676</span>              :     { return std::move(__rhs.insert(0, __lhs)); }</span>
<span id="L3677"><span class="lineNum">    3677</span>              : </span>
<span id="L3678"><span class="lineNum">    3678</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3679"><span class="lineNum">    3679</span>              :     _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3680"><span class="lineNum">    3680</span>              :     inline basic_string&lt;_CharT, _Traits, _Alloc&gt;</span>
<span id="L3681"><span class="lineNum">    3681</span>              :     operator+(_CharT __lhs,</span>
<span id="L3682"><span class="lineNum">    3682</span>              :               basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;&amp; __rhs)</span>
<span id="L3683"><span class="lineNum">    3683</span>              :     { return std::move(__rhs.insert(0, 1, __lhs)); }</span>
<span id="L3684"><span class="lineNum">    3684</span>              : </span>
<span id="L3685"><span class="lineNum">    3685</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3686"><span class="lineNum">    3686</span>              :     _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3687"><span class="lineNum">    3687</span>              :     inline basic_string&lt;_CharT, _Traits, _Alloc&gt;</span>
<span id="L3688"><span class="lineNum">    3688</span> <span class="tlaGNC tlaBgGNC">           1 :     operator+(basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;&amp; __lhs,</span></span>
<span id="L3689"><span class="lineNum">    3689</span>              :               const _CharT* __rhs)</span>
<span id="L3690"><span class="lineNum">    3690</span> <span class="tlaGNC">           1 :     { return std::move(__lhs.append(__rhs)); }</span></span>
<span id="L3691"><span class="lineNum">    3691</span>              : </span>
<span id="L3692"><span class="lineNum">    3692</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3693"><span class="lineNum">    3693</span>              :     _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3694"><span class="lineNum">    3694</span>              :     inline basic_string&lt;_CharT, _Traits, _Alloc&gt;</span>
<span id="L3695"><span class="lineNum">    3695</span>              :     operator+(basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;&amp; __lhs,</span>
<span id="L3696"><span class="lineNum">    3696</span>              :               _CharT __rhs)</span>
<span id="L3697"><span class="lineNum">    3697</span>              :     { return std::move(__lhs.append(1, __rhs)); }</span>
<span id="L3698"><span class="lineNum">    3698</span>              : #endif</span>
<span id="L3699"><span class="lineNum">    3699</span>              : </span>
<span id="L3700"><span class="lineNum">    3700</span>              :   // operator ==</span>
<span id="L3701"><span class="lineNum">    3701</span>              :   /**</span>
<span id="L3702"><span class="lineNum">    3702</span>              :    *  @brief  Test equivalence of two strings.</span>
<span id="L3703"><span class="lineNum">    3703</span>              :    *  @param __lhs  First string.</span>
<span id="L3704"><span class="lineNum">    3704</span>              :    *  @param __rhs  Second string.</span>
<span id="L3705"><span class="lineNum">    3705</span>              :    *  @return  True if @a __lhs.compare(@a __rhs) == 0.  False otherwise.</span>
<span id="L3706"><span class="lineNum">    3706</span>              :    */</span>
<span id="L3707"><span class="lineNum">    3707</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3708"><span class="lineNum">    3708</span>              :     _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3709"><span class="lineNum">    3709</span>              :     inline bool</span>
<span id="L3710"><span class="lineNum">    3710</span> <span class="tlaGNC">           7 :     operator==(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span></span>
<span id="L3711"><span class="lineNum">    3711</span>              :                const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __rhs)</span>
<span id="L3712"><span class="lineNum">    3712</span>              :     _GLIBCXX_NOEXCEPT</span>
<span id="L3713"><span class="lineNum">    3713</span>              :     {</span>
<span id="L3714"><span class="lineNum">    3714</span> <span class="tlaGNC">           7 :       return __lhs.size() == __rhs.size()</span></span>
<span id="L3715"><span class="lineNum">    3715</span> <span class="tlaGNC">           7 :                &amp;&amp; !_Traits::compare(__lhs.data(), __rhs.data(), __lhs.size());</span></span>
<span id="L3716"><span class="lineNum">    3716</span>              :     }</span>
<span id="L3717"><span class="lineNum">    3717</span>              : </span>
<span id="L3718"><span class="lineNum">    3718</span>              :   /**</span>
<span id="L3719"><span class="lineNum">    3719</span>              :    *  @brief  Test equivalence of string and C string.</span>
<span id="L3720"><span class="lineNum">    3720</span>              :    *  @param __lhs  String.</span>
<span id="L3721"><span class="lineNum">    3721</span>              :    *  @param __rhs  C string.</span>
<span id="L3722"><span class="lineNum">    3722</span>              :    *  @return  True if @a __lhs.compare(@a __rhs) == 0.  False otherwise.</span>
<span id="L3723"><span class="lineNum">    3723</span>              :    */</span>
<span id="L3724"><span class="lineNum">    3724</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3725"><span class="lineNum">    3725</span>              :     _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR</span>
<span id="L3726"><span class="lineNum">    3726</span>              :     inline bool</span>
<span id="L3727"><span class="lineNum">    3727</span> <span class="tlaGNC">         324 :     operator==(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span></span>
<span id="L3728"><span class="lineNum">    3728</span>              :                const _CharT* __rhs)</span>
<span id="L3729"><span class="lineNum">    3729</span>              :     {</span>
<span id="L3730"><span class="lineNum">    3730</span> <span class="tlaGNC">         324 :       return __lhs.size() == _Traits::length(__rhs)</span></span>
<span id="L3731"><span class="lineNum">    3731</span> <span class="tlaGNC">         324 :                &amp;&amp; !_Traits::compare(__lhs.data(), __rhs, __lhs.size());</span></span>
<span id="L3732"><span class="lineNum">    3732</span>              :     }</span>
<span id="L3733"><span class="lineNum">    3733</span>              : </span>
<span id="L3734"><span class="lineNum">    3734</span>              : #if __cpp_lib_three_way_comparison</span>
<span id="L3735"><span class="lineNum">    3735</span>              :   /**</span>
<span id="L3736"><span class="lineNum">    3736</span>              :    *  @brief  Three-way comparison of a string and a C string.</span>
<span id="L3737"><span class="lineNum">    3737</span>              :    *  @param __lhs  A string.</span>
<span id="L3738"><span class="lineNum">    3738</span>              :    *  @param __rhs  A null-terminated string.</span>
<span id="L3739"><span class="lineNum">    3739</span>              :    *  @return  A value indicating whether `__lhs` is less than, equal to,</span>
<span id="L3740"><span class="lineNum">    3740</span>              :    *           greater than, or incomparable with `__rhs`.</span>
<span id="L3741"><span class="lineNum">    3741</span>              :    */</span>
<span id="L3742"><span class="lineNum">    3742</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3743"><span class="lineNum">    3743</span>              :     [[nodiscard]]</span>
<span id="L3744"><span class="lineNum">    3744</span>              :     constexpr auto</span>
<span id="L3745"><span class="lineNum">    3745</span>              :     operator&lt;=&gt;(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span>
<span id="L3746"><span class="lineNum">    3746</span>              :                 const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __rhs) noexcept</span>
<span id="L3747"><span class="lineNum">    3747</span>              :     -&gt; decltype(__detail::__char_traits_cmp_cat&lt;_Traits&gt;(0))</span>
<span id="L3748"><span class="lineNum">    3748</span>              :     { return __detail::__char_traits_cmp_cat&lt;_Traits&gt;(__lhs.compare(__rhs)); }</span>
<span id="L3749"><span class="lineNum">    3749</span>              : </span>
<span id="L3750"><span class="lineNum">    3750</span>              :   /**</span>
<span id="L3751"><span class="lineNum">    3751</span>              :    *  @brief  Three-way comparison of a string and a C string.</span>
<span id="L3752"><span class="lineNum">    3752</span>              :    *  @param __lhs  A string.</span>
<span id="L3753"><span class="lineNum">    3753</span>              :    *  @param __rhs  A null-terminated string.</span>
<span id="L3754"><span class="lineNum">    3754</span>              :    *  @return  A value indicating whether `__lhs` is less than, equal to,</span>
<span id="L3755"><span class="lineNum">    3755</span>              :    *           greater than, or incomparable with `__rhs`.</span>
<span id="L3756"><span class="lineNum">    3756</span>              :    */</span>
<span id="L3757"><span class="lineNum">    3757</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3758"><span class="lineNum">    3758</span>              :     [[nodiscard]]</span>
<span id="L3759"><span class="lineNum">    3759</span>              :     constexpr auto</span>
<span id="L3760"><span class="lineNum">    3760</span>              :     operator&lt;=&gt;(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span>
<span id="L3761"><span class="lineNum">    3761</span>              :                 const _CharT* __rhs) noexcept</span>
<span id="L3762"><span class="lineNum">    3762</span>              :     -&gt; decltype(__detail::__char_traits_cmp_cat&lt;_Traits&gt;(0))</span>
<span id="L3763"><span class="lineNum">    3763</span>              :     { return __detail::__char_traits_cmp_cat&lt;_Traits&gt;(__lhs.compare(__rhs)); }</span>
<span id="L3764"><span class="lineNum">    3764</span>              : #else</span>
<span id="L3765"><span class="lineNum">    3765</span>              :   /**</span>
<span id="L3766"><span class="lineNum">    3766</span>              :    *  @brief  Test equivalence of C string and string.</span>
<span id="L3767"><span class="lineNum">    3767</span>              :    *  @param __lhs  C string.</span>
<span id="L3768"><span class="lineNum">    3768</span>              :    *  @param __rhs  String.</span>
<span id="L3769"><span class="lineNum">    3769</span>              :    *  @return  True if @a __rhs.compare(@a __lhs) == 0.  False otherwise.</span>
<span id="L3770"><span class="lineNum">    3770</span>              :    */</span>
<span id="L3771"><span class="lineNum">    3771</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3772"><span class="lineNum">    3772</span>              :     _GLIBCXX_NODISCARD</span>
<span id="L3773"><span class="lineNum">    3773</span>              :     inline bool</span>
<span id="L3774"><span class="lineNum">    3774</span>              :     operator==(const _CharT* __lhs,</span>
<span id="L3775"><span class="lineNum">    3775</span>              :                const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __rhs)</span>
<span id="L3776"><span class="lineNum">    3776</span>              :     { return __rhs == __lhs; }</span>
<span id="L3777"><span class="lineNum">    3777</span>              : </span>
<span id="L3778"><span class="lineNum">    3778</span>              :   // operator !=</span>
<span id="L3779"><span class="lineNum">    3779</span>              :   /**</span>
<span id="L3780"><span class="lineNum">    3780</span>              :    *  @brief  Test difference of two strings.</span>
<span id="L3781"><span class="lineNum">    3781</span>              :    *  @param __lhs  First string.</span>
<span id="L3782"><span class="lineNum">    3782</span>              :    *  @param __rhs  Second string.</span>
<span id="L3783"><span class="lineNum">    3783</span>              :    *  @return  True if @a __lhs.compare(@a __rhs) != 0.  False otherwise.</span>
<span id="L3784"><span class="lineNum">    3784</span>              :    */</span>
<span id="L3785"><span class="lineNum">    3785</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3786"><span class="lineNum">    3786</span>              :     _GLIBCXX_NODISCARD</span>
<span id="L3787"><span class="lineNum">    3787</span>              :     inline bool</span>
<span id="L3788"><span class="lineNum">    3788</span> <span class="tlaUNC tlaBgUNC">           0 :     operator!=(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span></span>
<span id="L3789"><span class="lineNum">    3789</span>              :                const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __rhs)</span>
<span id="L3790"><span class="lineNum">    3790</span>              :     _GLIBCXX_NOEXCEPT</span>
<span id="L3791"><span class="lineNum">    3791</span> <span class="tlaUNC">           0 :     { return !(__lhs == __rhs); }</span></span>
<span id="L3792"><span class="lineNum">    3792</span>              : </span>
<span id="L3793"><span class="lineNum">    3793</span>              :   /**</span>
<span id="L3794"><span class="lineNum">    3794</span>              :    *  @brief  Test difference of C string and string.</span>
<span id="L3795"><span class="lineNum">    3795</span>              :    *  @param __lhs  C string.</span>
<span id="L3796"><span class="lineNum">    3796</span>              :    *  @param __rhs  String.</span>
<span id="L3797"><span class="lineNum">    3797</span>              :    *  @return  True if @a __rhs.compare(@a __lhs) != 0.  False otherwise.</span>
<span id="L3798"><span class="lineNum">    3798</span>              :    */</span>
<span id="L3799"><span class="lineNum">    3799</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3800"><span class="lineNum">    3800</span>              :     _GLIBCXX_NODISCARD</span>
<span id="L3801"><span class="lineNum">    3801</span>              :     inline bool</span>
<span id="L3802"><span class="lineNum">    3802</span>              :     operator!=(const _CharT* __lhs,</span>
<span id="L3803"><span class="lineNum">    3803</span>              :                const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __rhs)</span>
<span id="L3804"><span class="lineNum">    3804</span>              :     { return !(__rhs == __lhs); }</span>
<span id="L3805"><span class="lineNum">    3805</span>              : </span>
<span id="L3806"><span class="lineNum">    3806</span>              :   /**</span>
<span id="L3807"><span class="lineNum">    3807</span>              :    *  @brief  Test difference of string and C string.</span>
<span id="L3808"><span class="lineNum">    3808</span>              :    *  @param __lhs  String.</span>
<span id="L3809"><span class="lineNum">    3809</span>              :    *  @param __rhs  C string.</span>
<span id="L3810"><span class="lineNum">    3810</span>              :    *  @return  True if @a __lhs.compare(@a __rhs) != 0.  False otherwise.</span>
<span id="L3811"><span class="lineNum">    3811</span>              :    */</span>
<span id="L3812"><span class="lineNum">    3812</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3813"><span class="lineNum">    3813</span>              :     _GLIBCXX_NODISCARD</span>
<span id="L3814"><span class="lineNum">    3814</span>              :     inline bool</span>
<span id="L3815"><span class="lineNum">    3815</span> <span class="tlaUNC">           0 :     operator!=(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span></span>
<span id="L3816"><span class="lineNum">    3816</span>              :                const _CharT* __rhs)</span>
<span id="L3817"><span class="lineNum">    3817</span> <span class="tlaUNC">           0 :     { return !(__lhs == __rhs); }</span></span>
<span id="L3818"><span class="lineNum">    3818</span>              : </span>
<span id="L3819"><span class="lineNum">    3819</span>              :   // operator &lt;</span>
<span id="L3820"><span class="lineNum">    3820</span>              :   /**</span>
<span id="L3821"><span class="lineNum">    3821</span>              :    *  @brief  Test if string precedes string.</span>
<span id="L3822"><span class="lineNum">    3822</span>              :    *  @param __lhs  First string.</span>
<span id="L3823"><span class="lineNum">    3823</span>              :    *  @param __rhs  Second string.</span>
<span id="L3824"><span class="lineNum">    3824</span>              :    *  @return  True if @a __lhs precedes @a __rhs.  False otherwise.</span>
<span id="L3825"><span class="lineNum">    3825</span>              :    */</span>
<span id="L3826"><span class="lineNum">    3826</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3827"><span class="lineNum">    3827</span>              :     _GLIBCXX_NODISCARD</span>
<span id="L3828"><span class="lineNum">    3828</span>              :     inline bool</span>
<span id="L3829"><span class="lineNum">    3829</span>              :     operator&lt;(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span>
<span id="L3830"><span class="lineNum">    3830</span>              :               const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __rhs)</span>
<span id="L3831"><span class="lineNum">    3831</span>              :     _GLIBCXX_NOEXCEPT</span>
<span id="L3832"><span class="lineNum">    3832</span>              :     { return __lhs.compare(__rhs) &lt; 0; }</span>
<span id="L3833"><span class="lineNum">    3833</span>              : </span>
<span id="L3834"><span class="lineNum">    3834</span>              :   /**</span>
<span id="L3835"><span class="lineNum">    3835</span>              :    *  @brief  Test if string precedes C string.</span>
<span id="L3836"><span class="lineNum">    3836</span>              :    *  @param __lhs  String.</span>
<span id="L3837"><span class="lineNum">    3837</span>              :    *  @param __rhs  C string.</span>
<span id="L3838"><span class="lineNum">    3838</span>              :    *  @return  True if @a __lhs precedes @a __rhs.  False otherwise.</span>
<span id="L3839"><span class="lineNum">    3839</span>              :    */</span>
<span id="L3840"><span class="lineNum">    3840</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3841"><span class="lineNum">    3841</span>              :     _GLIBCXX_NODISCARD</span>
<span id="L3842"><span class="lineNum">    3842</span>              :     inline bool</span>
<span id="L3843"><span class="lineNum">    3843</span>              :     operator&lt;(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span>
<span id="L3844"><span class="lineNum">    3844</span>              :               const _CharT* __rhs)</span>
<span id="L3845"><span class="lineNum">    3845</span>              :     { return __lhs.compare(__rhs) &lt; 0; }</span>
<span id="L3846"><span class="lineNum">    3846</span>              : </span>
<span id="L3847"><span class="lineNum">    3847</span>              :   /**</span>
<span id="L3848"><span class="lineNum">    3848</span>              :    *  @brief  Test if C string precedes string.</span>
<span id="L3849"><span class="lineNum">    3849</span>              :    *  @param __lhs  C string.</span>
<span id="L3850"><span class="lineNum">    3850</span>              :    *  @param __rhs  String.</span>
<span id="L3851"><span class="lineNum">    3851</span>              :    *  @return  True if @a __lhs precedes @a __rhs.  False otherwise.</span>
<span id="L3852"><span class="lineNum">    3852</span>              :    */</span>
<span id="L3853"><span class="lineNum">    3853</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3854"><span class="lineNum">    3854</span>              :     _GLIBCXX_NODISCARD</span>
<span id="L3855"><span class="lineNum">    3855</span>              :     inline bool</span>
<span id="L3856"><span class="lineNum">    3856</span>              :     operator&lt;(const _CharT* __lhs,</span>
<span id="L3857"><span class="lineNum">    3857</span>              :               const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __rhs)</span>
<span id="L3858"><span class="lineNum">    3858</span>              :     { return __rhs.compare(__lhs) &gt; 0; }</span>
<span id="L3859"><span class="lineNum">    3859</span>              : </span>
<span id="L3860"><span class="lineNum">    3860</span>              :   // operator &gt;</span>
<span id="L3861"><span class="lineNum">    3861</span>              :   /**</span>
<span id="L3862"><span class="lineNum">    3862</span>              :    *  @brief  Test if string follows string.</span>
<span id="L3863"><span class="lineNum">    3863</span>              :    *  @param __lhs  First string.</span>
<span id="L3864"><span class="lineNum">    3864</span>              :    *  @param __rhs  Second string.</span>
<span id="L3865"><span class="lineNum">    3865</span>              :    *  @return  True if @a __lhs follows @a __rhs.  False otherwise.</span>
<span id="L3866"><span class="lineNum">    3866</span>              :    */</span>
<span id="L3867"><span class="lineNum">    3867</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3868"><span class="lineNum">    3868</span>              :     _GLIBCXX_NODISCARD</span>
<span id="L3869"><span class="lineNum">    3869</span>              :     inline bool</span>
<span id="L3870"><span class="lineNum">    3870</span>              :     operator&gt;(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span>
<span id="L3871"><span class="lineNum">    3871</span>              :               const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __rhs)</span>
<span id="L3872"><span class="lineNum">    3872</span>              :     _GLIBCXX_NOEXCEPT</span>
<span id="L3873"><span class="lineNum">    3873</span>              :     { return __lhs.compare(__rhs) &gt; 0; }</span>
<span id="L3874"><span class="lineNum">    3874</span>              : </span>
<span id="L3875"><span class="lineNum">    3875</span>              :   /**</span>
<span id="L3876"><span class="lineNum">    3876</span>              :    *  @brief  Test if string follows C string.</span>
<span id="L3877"><span class="lineNum">    3877</span>              :    *  @param __lhs  String.</span>
<span id="L3878"><span class="lineNum">    3878</span>              :    *  @param __rhs  C string.</span>
<span id="L3879"><span class="lineNum">    3879</span>              :    *  @return  True if @a __lhs follows @a __rhs.  False otherwise.</span>
<span id="L3880"><span class="lineNum">    3880</span>              :    */</span>
<span id="L3881"><span class="lineNum">    3881</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3882"><span class="lineNum">    3882</span>              :     _GLIBCXX_NODISCARD</span>
<span id="L3883"><span class="lineNum">    3883</span>              :     inline bool</span>
<span id="L3884"><span class="lineNum">    3884</span>              :     operator&gt;(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span>
<span id="L3885"><span class="lineNum">    3885</span>              :               const _CharT* __rhs)</span>
<span id="L3886"><span class="lineNum">    3886</span>              :     { return __lhs.compare(__rhs) &gt; 0; }</span>
<span id="L3887"><span class="lineNum">    3887</span>              : </span>
<span id="L3888"><span class="lineNum">    3888</span>              :   /**</span>
<span id="L3889"><span class="lineNum">    3889</span>              :    *  @brief  Test if C string follows string.</span>
<span id="L3890"><span class="lineNum">    3890</span>              :    *  @param __lhs  C string.</span>
<span id="L3891"><span class="lineNum">    3891</span>              :    *  @param __rhs  String.</span>
<span id="L3892"><span class="lineNum">    3892</span>              :    *  @return  True if @a __lhs follows @a __rhs.  False otherwise.</span>
<span id="L3893"><span class="lineNum">    3893</span>              :    */</span>
<span id="L3894"><span class="lineNum">    3894</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3895"><span class="lineNum">    3895</span>              :     _GLIBCXX_NODISCARD</span>
<span id="L3896"><span class="lineNum">    3896</span>              :     inline bool</span>
<span id="L3897"><span class="lineNum">    3897</span>              :     operator&gt;(const _CharT* __lhs,</span>
<span id="L3898"><span class="lineNum">    3898</span>              :               const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __rhs)</span>
<span id="L3899"><span class="lineNum">    3899</span>              :     { return __rhs.compare(__lhs) &lt; 0; }</span>
<span id="L3900"><span class="lineNum">    3900</span>              : </span>
<span id="L3901"><span class="lineNum">    3901</span>              :   // operator &lt;=</span>
<span id="L3902"><span class="lineNum">    3902</span>              :   /**</span>
<span id="L3903"><span class="lineNum">    3903</span>              :    *  @brief  Test if string doesn't follow string.</span>
<span id="L3904"><span class="lineNum">    3904</span>              :    *  @param __lhs  First string.</span>
<span id="L3905"><span class="lineNum">    3905</span>              :    *  @param __rhs  Second string.</span>
<span id="L3906"><span class="lineNum">    3906</span>              :    *  @return  True if @a __lhs doesn't follow @a __rhs.  False otherwise.</span>
<span id="L3907"><span class="lineNum">    3907</span>              :    */</span>
<span id="L3908"><span class="lineNum">    3908</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3909"><span class="lineNum">    3909</span>              :     _GLIBCXX_NODISCARD</span>
<span id="L3910"><span class="lineNum">    3910</span>              :     inline bool</span>
<span id="L3911"><span class="lineNum">    3911</span>              :     operator&lt;=(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span>
<span id="L3912"><span class="lineNum">    3912</span>              :                const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __rhs)</span>
<span id="L3913"><span class="lineNum">    3913</span>              :     _GLIBCXX_NOEXCEPT</span>
<span id="L3914"><span class="lineNum">    3914</span>              :     { return __lhs.compare(__rhs) &lt;= 0; }</span>
<span id="L3915"><span class="lineNum">    3915</span>              : </span>
<span id="L3916"><span class="lineNum">    3916</span>              :   /**</span>
<span id="L3917"><span class="lineNum">    3917</span>              :    *  @brief  Test if string doesn't follow C string.</span>
<span id="L3918"><span class="lineNum">    3918</span>              :    *  @param __lhs  String.</span>
<span id="L3919"><span class="lineNum">    3919</span>              :    *  @param __rhs  C string.</span>
<span id="L3920"><span class="lineNum">    3920</span>              :    *  @return  True if @a __lhs doesn't follow @a __rhs.  False otherwise.</span>
<span id="L3921"><span class="lineNum">    3921</span>              :    */</span>
<span id="L3922"><span class="lineNum">    3922</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3923"><span class="lineNum">    3923</span>              :     _GLIBCXX_NODISCARD</span>
<span id="L3924"><span class="lineNum">    3924</span>              :     inline bool</span>
<span id="L3925"><span class="lineNum">    3925</span>              :     operator&lt;=(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span>
<span id="L3926"><span class="lineNum">    3926</span>              :                const _CharT* __rhs)</span>
<span id="L3927"><span class="lineNum">    3927</span>              :     { return __lhs.compare(__rhs) &lt;= 0; }</span>
<span id="L3928"><span class="lineNum">    3928</span>              : </span>
<span id="L3929"><span class="lineNum">    3929</span>              :   /**</span>
<span id="L3930"><span class="lineNum">    3930</span>              :    *  @brief  Test if C string doesn't follow string.</span>
<span id="L3931"><span class="lineNum">    3931</span>              :    *  @param __lhs  C string.</span>
<span id="L3932"><span class="lineNum">    3932</span>              :    *  @param __rhs  String.</span>
<span id="L3933"><span class="lineNum">    3933</span>              :    *  @return  True if @a __lhs doesn't follow @a __rhs.  False otherwise.</span>
<span id="L3934"><span class="lineNum">    3934</span>              :    */</span>
<span id="L3935"><span class="lineNum">    3935</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3936"><span class="lineNum">    3936</span>              :     _GLIBCXX_NODISCARD</span>
<span id="L3937"><span class="lineNum">    3937</span>              :     inline bool</span>
<span id="L3938"><span class="lineNum">    3938</span>              :     operator&lt;=(const _CharT* __lhs,</span>
<span id="L3939"><span class="lineNum">    3939</span>              :                const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __rhs)</span>
<span id="L3940"><span class="lineNum">    3940</span>              :     { return __rhs.compare(__lhs) &gt;= 0; }</span>
<span id="L3941"><span class="lineNum">    3941</span>              : </span>
<span id="L3942"><span class="lineNum">    3942</span>              :   // operator &gt;=</span>
<span id="L3943"><span class="lineNum">    3943</span>              :   /**</span>
<span id="L3944"><span class="lineNum">    3944</span>              :    *  @brief  Test if string doesn't precede string.</span>
<span id="L3945"><span class="lineNum">    3945</span>              :    *  @param __lhs  First string.</span>
<span id="L3946"><span class="lineNum">    3946</span>              :    *  @param __rhs  Second string.</span>
<span id="L3947"><span class="lineNum">    3947</span>              :    *  @return  True if @a __lhs doesn't precede @a __rhs.  False otherwise.</span>
<span id="L3948"><span class="lineNum">    3948</span>              :    */</span>
<span id="L3949"><span class="lineNum">    3949</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3950"><span class="lineNum">    3950</span>              :     _GLIBCXX_NODISCARD</span>
<span id="L3951"><span class="lineNum">    3951</span>              :     inline bool</span>
<span id="L3952"><span class="lineNum">    3952</span>              :     operator&gt;=(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span>
<span id="L3953"><span class="lineNum">    3953</span>              :                const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __rhs)</span>
<span id="L3954"><span class="lineNum">    3954</span>              :     _GLIBCXX_NOEXCEPT</span>
<span id="L3955"><span class="lineNum">    3955</span>              :     { return __lhs.compare(__rhs) &gt;= 0; }</span>
<span id="L3956"><span class="lineNum">    3956</span>              : </span>
<span id="L3957"><span class="lineNum">    3957</span>              :   /**</span>
<span id="L3958"><span class="lineNum">    3958</span>              :    *  @brief  Test if string doesn't precede C string.</span>
<span id="L3959"><span class="lineNum">    3959</span>              :    *  @param __lhs  String.</span>
<span id="L3960"><span class="lineNum">    3960</span>              :    *  @param __rhs  C string.</span>
<span id="L3961"><span class="lineNum">    3961</span>              :    *  @return  True if @a __lhs doesn't precede @a __rhs.  False otherwise.</span>
<span id="L3962"><span class="lineNum">    3962</span>              :    */</span>
<span id="L3963"><span class="lineNum">    3963</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3964"><span class="lineNum">    3964</span>              :     _GLIBCXX_NODISCARD</span>
<span id="L3965"><span class="lineNum">    3965</span>              :     inline bool</span>
<span id="L3966"><span class="lineNum">    3966</span>              :     operator&gt;=(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span>
<span id="L3967"><span class="lineNum">    3967</span>              :                const _CharT* __rhs)</span>
<span id="L3968"><span class="lineNum">    3968</span>              :     { return __lhs.compare(__rhs) &gt;= 0; }</span>
<span id="L3969"><span class="lineNum">    3969</span>              : </span>
<span id="L3970"><span class="lineNum">    3970</span>              :   /**</span>
<span id="L3971"><span class="lineNum">    3971</span>              :    *  @brief  Test if C string doesn't precede string.</span>
<span id="L3972"><span class="lineNum">    3972</span>              :    *  @param __lhs  C string.</span>
<span id="L3973"><span class="lineNum">    3973</span>              :    *  @param __rhs  String.</span>
<span id="L3974"><span class="lineNum">    3974</span>              :    *  @return  True if @a __lhs doesn't precede @a __rhs.  False otherwise.</span>
<span id="L3975"><span class="lineNum">    3975</span>              :    */</span>
<span id="L3976"><span class="lineNum">    3976</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3977"><span class="lineNum">    3977</span>              :     _GLIBCXX_NODISCARD</span>
<span id="L3978"><span class="lineNum">    3978</span>              :     inline bool</span>
<span id="L3979"><span class="lineNum">    3979</span>              :     operator&gt;=(const _CharT* __lhs,</span>
<span id="L3980"><span class="lineNum">    3980</span>              :              const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __rhs)</span>
<span id="L3981"><span class="lineNum">    3981</span>              :     { return __rhs.compare(__lhs) &lt;= 0; }</span>
<span id="L3982"><span class="lineNum">    3982</span>              : #endif // three-way comparison</span>
<span id="L3983"><span class="lineNum">    3983</span>              : </span>
<span id="L3984"><span class="lineNum">    3984</span>              :   /**</span>
<span id="L3985"><span class="lineNum">    3985</span>              :    *  @brief  Swap contents of two strings.</span>
<span id="L3986"><span class="lineNum">    3986</span>              :    *  @param __lhs  First string.</span>
<span id="L3987"><span class="lineNum">    3987</span>              :    *  @param __rhs  Second string.</span>
<span id="L3988"><span class="lineNum">    3988</span>              :    *</span>
<span id="L3989"><span class="lineNum">    3989</span>              :    *  Exchanges the contents of @a __lhs and @a __rhs in constant time.</span>
<span id="L3990"><span class="lineNum">    3990</span>              :    */</span>
<span id="L3991"><span class="lineNum">    3991</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L3992"><span class="lineNum">    3992</span>              :     _GLIBCXX20_CONSTEXPR</span>
<span id="L3993"><span class="lineNum">    3993</span>              :     inline void</span>
<span id="L3994"><span class="lineNum">    3994</span>              :     swap(basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,</span>
<span id="L3995"><span class="lineNum">    3995</span>              :          basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __rhs)</span>
<span id="L3996"><span class="lineNum">    3996</span>              :     _GLIBCXX_NOEXCEPT_IF(noexcept(__lhs.swap(__rhs)))</span>
<span id="L3997"><span class="lineNum">    3997</span>              :     { __lhs.swap(__rhs); }</span>
<span id="L3998"><span class="lineNum">    3998</span>              : </span>
<span id="L3999"><span class="lineNum">    3999</span>              : </span>
<span id="L4000"><span class="lineNum">    4000</span>              :   /**</span>
<span id="L4001"><span class="lineNum">    4001</span>              :    *  @brief  Read stream into a string.</span>
<span id="L4002"><span class="lineNum">    4002</span>              :    *  @param __is  Input stream.</span>
<span id="L4003"><span class="lineNum">    4003</span>              :    *  @param __str  Buffer to store into.</span>
<span id="L4004"><span class="lineNum">    4004</span>              :    *  @return  Reference to the input stream.</span>
<span id="L4005"><span class="lineNum">    4005</span>              :    *</span>
<span id="L4006"><span class="lineNum">    4006</span>              :    *  Stores characters from @a __is into @a __str until whitespace is</span>
<span id="L4007"><span class="lineNum">    4007</span>              :    *  found, the end of the stream is encountered, or str.max_size()</span>
<span id="L4008"><span class="lineNum">    4008</span>              :    *  is reached.  If is.width() is non-zero, that is the limit on the</span>
<span id="L4009"><span class="lineNum">    4009</span>              :    *  number of characters stored into @a __str.  Any previous</span>
<span id="L4010"><span class="lineNum">    4010</span>              :    *  contents of @a __str are erased.</span>
<span id="L4011"><span class="lineNum">    4011</span>              :    */</span>
<span id="L4012"><span class="lineNum">    4012</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L4013"><span class="lineNum">    4013</span>              :     basic_istream&lt;_CharT, _Traits&gt;&amp;</span>
<span id="L4014"><span class="lineNum">    4014</span>              :     operator&gt;&gt;(basic_istream&lt;_CharT, _Traits&gt;&amp; __is,</span>
<span id="L4015"><span class="lineNum">    4015</span>              :                basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __str);</span>
<span id="L4016"><span class="lineNum">    4016</span>              : </span>
<span id="L4017"><span class="lineNum">    4017</span>              :   template&lt;&gt;</span>
<span id="L4018"><span class="lineNum">    4018</span>              :     basic_istream&lt;char&gt;&amp;</span>
<span id="L4019"><span class="lineNum">    4019</span>              :     operator&gt;&gt;(basic_istream&lt;char&gt;&amp; __is, basic_string&lt;char&gt;&amp; __str);</span>
<span id="L4020"><span class="lineNum">    4020</span>              : </span>
<span id="L4021"><span class="lineNum">    4021</span>              :   /**</span>
<span id="L4022"><span class="lineNum">    4022</span>              :    *  @brief  Write string to a stream.</span>
<span id="L4023"><span class="lineNum">    4023</span>              :    *  @param __os  Output stream.</span>
<span id="L4024"><span class="lineNum">    4024</span>              :    *  @param __str  String to write out.</span>
<span id="L4025"><span class="lineNum">    4025</span>              :    *  @return  Reference to the output stream.</span>
<span id="L4026"><span class="lineNum">    4026</span>              :    *</span>
<span id="L4027"><span class="lineNum">    4027</span>              :    *  Output characters of @a __str into os following the same rules as for</span>
<span id="L4028"><span class="lineNum">    4028</span>              :    *  writing a C string.</span>
<span id="L4029"><span class="lineNum">    4029</span>              :    */</span>
<span id="L4030"><span class="lineNum">    4030</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L4031"><span class="lineNum">    4031</span>              :     inline basic_ostream&lt;_CharT, _Traits&gt;&amp;</span>
<span id="L4032"><span class="lineNum">    4032</span>              :     operator&lt;&lt;(basic_ostream&lt;_CharT, _Traits&gt;&amp; __os,</span>
<span id="L4033"><span class="lineNum">    4033</span>              :                const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __str)</span>
<span id="L4034"><span class="lineNum">    4034</span>              :     {</span>
<span id="L4035"><span class="lineNum">    4035</span>              :       // _GLIBCXX_RESOLVE_LIB_DEFECTS</span>
<span id="L4036"><span class="lineNum">    4036</span>              :       // 586. string inserter not a formatted function</span>
<span id="L4037"><span class="lineNum">    4037</span>              :       return __ostream_insert(__os, __str.data(), __str.size());</span>
<span id="L4038"><span class="lineNum">    4038</span>              :     }</span>
<span id="L4039"><span class="lineNum">    4039</span>              : </span>
<span id="L4040"><span class="lineNum">    4040</span>              :   /**</span>
<span id="L4041"><span class="lineNum">    4041</span>              :    *  @brief  Read a line from stream into a string.</span>
<span id="L4042"><span class="lineNum">    4042</span>              :    *  @param __is  Input stream.</span>
<span id="L4043"><span class="lineNum">    4043</span>              :    *  @param __str  Buffer to store into.</span>
<span id="L4044"><span class="lineNum">    4044</span>              :    *  @param __delim  Character marking end of line.</span>
<span id="L4045"><span class="lineNum">    4045</span>              :    *  @return  Reference to the input stream.</span>
<span id="L4046"><span class="lineNum">    4046</span>              :    *</span>
<span id="L4047"><span class="lineNum">    4047</span>              :    *  Stores characters from @a __is into @a __str until @a __delim is</span>
<span id="L4048"><span class="lineNum">    4048</span>              :    *  found, the end of the stream is encountered, or str.max_size()</span>
<span id="L4049"><span class="lineNum">    4049</span>              :    *  is reached.  Any previous contents of @a __str are erased.  If</span>
<span id="L4050"><span class="lineNum">    4050</span>              :    *  @a __delim is encountered, it is extracted but not stored into</span>
<span id="L4051"><span class="lineNum">    4051</span>              :    *  @a __str.</span>
<span id="L4052"><span class="lineNum">    4052</span>              :    */</span>
<span id="L4053"><span class="lineNum">    4053</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L4054"><span class="lineNum">    4054</span>              :     basic_istream&lt;_CharT, _Traits&gt;&amp;</span>
<span id="L4055"><span class="lineNum">    4055</span>              :     getline(basic_istream&lt;_CharT, _Traits&gt;&amp; __is,</span>
<span id="L4056"><span class="lineNum">    4056</span>              :             basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __str, _CharT __delim);</span>
<span id="L4057"><span class="lineNum">    4057</span>              : </span>
<span id="L4058"><span class="lineNum">    4058</span>              :   /**</span>
<span id="L4059"><span class="lineNum">    4059</span>              :    *  @brief  Read a line from stream into a string.</span>
<span id="L4060"><span class="lineNum">    4060</span>              :    *  @param __is  Input stream.</span>
<span id="L4061"><span class="lineNum">    4061</span>              :    *  @param __str  Buffer to store into.</span>
<span id="L4062"><span class="lineNum">    4062</span>              :    *  @return  Reference to the input stream.</span>
<span id="L4063"><span class="lineNum">    4063</span>              :    *</span>
<span id="L4064"><span class="lineNum">    4064</span>              :    *  Stores characters from is into @a __str until &amp;apos;\n&amp;apos; is</span>
<span id="L4065"><span class="lineNum">    4065</span>              :    *  found, the end of the stream is encountered, or str.max_size()</span>
<span id="L4066"><span class="lineNum">    4066</span>              :    *  is reached.  Any previous contents of @a __str are erased.  If</span>
<span id="L4067"><span class="lineNum">    4067</span>              :    *  end of line is encountered, it is extracted but not stored into</span>
<span id="L4068"><span class="lineNum">    4068</span>              :    *  @a __str.</span>
<span id="L4069"><span class="lineNum">    4069</span>              :    */</span>
<span id="L4070"><span class="lineNum">    4070</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L4071"><span class="lineNum">    4071</span>              :     inline basic_istream&lt;_CharT, _Traits&gt;&amp;</span>
<span id="L4072"><span class="lineNum">    4072</span>              :     getline(basic_istream&lt;_CharT, _Traits&gt;&amp; __is,</span>
<span id="L4073"><span class="lineNum">    4073</span>              :             basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __str)</span>
<span id="L4074"><span class="lineNum">    4074</span>              :     { return std::getline(__is, __str, __is.widen('\n')); }</span>
<span id="L4075"><span class="lineNum">    4075</span>              : </span>
<span id="L4076"><span class="lineNum">    4076</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L4077"><span class="lineNum">    4077</span>              :   /// Read a line from an rvalue stream into a string.</span>
<span id="L4078"><span class="lineNum">    4078</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L4079"><span class="lineNum">    4079</span>              :     inline basic_istream&lt;_CharT, _Traits&gt;&amp;</span>
<span id="L4080"><span class="lineNum">    4080</span>              :     getline(basic_istream&lt;_CharT, _Traits&gt;&amp;&amp; __is,</span>
<span id="L4081"><span class="lineNum">    4081</span>              :             basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __str, _CharT __delim)</span>
<span id="L4082"><span class="lineNum">    4082</span>              :     { return std::getline(__is, __str, __delim); }</span>
<span id="L4083"><span class="lineNum">    4083</span>              : </span>
<span id="L4084"><span class="lineNum">    4084</span>              :   /// Read a line from an rvalue stream into a string.</span>
<span id="L4085"><span class="lineNum">    4085</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L4086"><span class="lineNum">    4086</span>              :     inline basic_istream&lt;_CharT, _Traits&gt;&amp;</span>
<span id="L4087"><span class="lineNum">    4087</span>              :     getline(basic_istream&lt;_CharT, _Traits&gt;&amp;&amp; __is,</span>
<span id="L4088"><span class="lineNum">    4088</span>              :             basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __str)</span>
<span id="L4089"><span class="lineNum">    4089</span>              :     { return std::getline(__is, __str); }</span>
<span id="L4090"><span class="lineNum">    4090</span>              : #endif</span>
<span id="L4091"><span class="lineNum">    4091</span>              : </span>
<span id="L4092"><span class="lineNum">    4092</span>              :   template&lt;&gt;</span>
<span id="L4093"><span class="lineNum">    4093</span>              :     basic_istream&lt;char&gt;&amp;</span>
<span id="L4094"><span class="lineNum">    4094</span>              :     getline(basic_istream&lt;char&gt;&amp; __in, basic_string&lt;char&gt;&amp; __str,</span>
<span id="L4095"><span class="lineNum">    4095</span>              :             char __delim);</span>
<span id="L4096"><span class="lineNum">    4096</span>              : </span>
<span id="L4097"><span class="lineNum">    4097</span>              : #ifdef _GLIBCXX_USE_WCHAR_T</span>
<span id="L4098"><span class="lineNum">    4098</span>              :   template&lt;&gt;</span>
<span id="L4099"><span class="lineNum">    4099</span>              :     basic_istream&lt;wchar_t&gt;&amp;</span>
<span id="L4100"><span class="lineNum">    4100</span>              :     getline(basic_istream&lt;wchar_t&gt;&amp; __in, basic_string&lt;wchar_t&gt;&amp; __str,</span>
<span id="L4101"><span class="lineNum">    4101</span>              :             wchar_t __delim);</span>
<span id="L4102"><span class="lineNum">    4102</span>              : #endif  </span>
<span id="L4103"><span class="lineNum">    4103</span>              : </span>
<span id="L4104"><span class="lineNum">    4104</span>              : _GLIBCXX_END_NAMESPACE_VERSION</span>
<span id="L4105"><span class="lineNum">    4105</span>              : } // namespace</span>
<span id="L4106"><span class="lineNum">    4106</span>              : </span>
<span id="L4107"><span class="lineNum">    4107</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L4108"><span class="lineNum">    4108</span>              : </span>
<span id="L4109"><span class="lineNum">    4109</span>              : #include &lt;ext/string_conversions.h&gt;</span>
<span id="L4110"><span class="lineNum">    4110</span>              : #include &lt;bits/charconv.h&gt;</span>
<span id="L4111"><span class="lineNum">    4111</span>              : </span>
<span id="L4112"><span class="lineNum">    4112</span>              : namespace std _GLIBCXX_VISIBILITY(default)</span>
<span id="L4113"><span class="lineNum">    4113</span>              : {</span>
<span id="L4114"><span class="lineNum">    4114</span>              : _GLIBCXX_BEGIN_NAMESPACE_VERSION</span>
<span id="L4115"><span class="lineNum">    4115</span>              : _GLIBCXX_BEGIN_NAMESPACE_CXX11</span>
<span id="L4116"><span class="lineNum">    4116</span>              : </span>
<span id="L4117"><span class="lineNum">    4117</span>              : #if _GLIBCXX_USE_C99_STDLIB</span>
<span id="L4118"><span class="lineNum">    4118</span>              :   // 21.4 Numeric Conversions [string.conversions].</span>
<span id="L4119"><span class="lineNum">    4119</span>              :   inline int</span>
<span id="L4120"><span class="lineNum">    4120</span>              :   stoi(const string&amp; __str, size_t* __idx = 0, int __base = 10)</span>
<span id="L4121"><span class="lineNum">    4121</span>              :   { return __gnu_cxx::__stoa&lt;long, int&gt;(&amp;std::strtol, &quot;stoi&quot;, __str.c_str(),</span>
<span id="L4122"><span class="lineNum">    4122</span>              :                                         __idx, __base); }</span>
<span id="L4123"><span class="lineNum">    4123</span>              : </span>
<span id="L4124"><span class="lineNum">    4124</span>              :   inline long</span>
<span id="L4125"><span class="lineNum">    4125</span>              :   stol(const string&amp; __str, size_t* __idx = 0, int __base = 10)</span>
<span id="L4126"><span class="lineNum">    4126</span>              :   { return __gnu_cxx::__stoa(&amp;std::strtol, &quot;stol&quot;, __str.c_str(),</span>
<span id="L4127"><span class="lineNum">    4127</span>              :                              __idx, __base); }</span>
<span id="L4128"><span class="lineNum">    4128</span>              : </span>
<span id="L4129"><span class="lineNum">    4129</span>              :   inline unsigned long</span>
<span id="L4130"><span class="lineNum">    4130</span>              :   stoul(const string&amp; __str, size_t* __idx = 0, int __base = 10)</span>
<span id="L4131"><span class="lineNum">    4131</span>              :   { return __gnu_cxx::__stoa(&amp;std::strtoul, &quot;stoul&quot;, __str.c_str(),</span>
<span id="L4132"><span class="lineNum">    4132</span>              :                              __idx, __base); }</span>
<span id="L4133"><span class="lineNum">    4133</span>              : </span>
<span id="L4134"><span class="lineNum">    4134</span>              :   inline long long</span>
<span id="L4135"><span class="lineNum">    4135</span>              :   stoll(const string&amp; __str, size_t* __idx = 0, int __base = 10)</span>
<span id="L4136"><span class="lineNum">    4136</span>              :   { return __gnu_cxx::__stoa(&amp;std::strtoll, &quot;stoll&quot;, __str.c_str(),</span>
<span id="L4137"><span class="lineNum">    4137</span>              :                              __idx, __base); }</span>
<span id="L4138"><span class="lineNum">    4138</span>              : </span>
<span id="L4139"><span class="lineNum">    4139</span>              :   inline unsigned long long</span>
<span id="L4140"><span class="lineNum">    4140</span>              :   stoull(const string&amp; __str, size_t* __idx = 0, int __base = 10)</span>
<span id="L4141"><span class="lineNum">    4141</span>              :   { return __gnu_cxx::__stoa(&amp;std::strtoull, &quot;stoull&quot;, __str.c_str(),</span>
<span id="L4142"><span class="lineNum">    4142</span>              :                              __idx, __base); }</span>
<span id="L4143"><span class="lineNum">    4143</span>              : </span>
<span id="L4144"><span class="lineNum">    4144</span>              :   // NB: strtof vs strtod.</span>
<span id="L4145"><span class="lineNum">    4145</span>              :   inline float</span>
<span id="L4146"><span class="lineNum">    4146</span>              :   stof(const string&amp; __str, size_t* __idx = 0)</span>
<span id="L4147"><span class="lineNum">    4147</span>              :   { return __gnu_cxx::__stoa(&amp;std::strtof, &quot;stof&quot;, __str.c_str(), __idx); }</span>
<span id="L4148"><span class="lineNum">    4148</span>              : </span>
<span id="L4149"><span class="lineNum">    4149</span>              :   inline double</span>
<span id="L4150"><span class="lineNum">    4150</span>              :   stod(const string&amp; __str, size_t* __idx = 0)</span>
<span id="L4151"><span class="lineNum">    4151</span>              :   { return __gnu_cxx::__stoa(&amp;std::strtod, &quot;stod&quot;, __str.c_str(), __idx); }</span>
<span id="L4152"><span class="lineNum">    4152</span>              : </span>
<span id="L4153"><span class="lineNum">    4153</span>              :   inline long double</span>
<span id="L4154"><span class="lineNum">    4154</span>              :   stold(const string&amp; __str, size_t* __idx = 0)</span>
<span id="L4155"><span class="lineNum">    4155</span>              :   { return __gnu_cxx::__stoa(&amp;std::strtold, &quot;stold&quot;, __str.c_str(), __idx); }</span>
<span id="L4156"><span class="lineNum">    4156</span>              : #endif // _GLIBCXX_USE_C99_STDLIB</span>
<span id="L4157"><span class="lineNum">    4157</span>              : </span>
<span id="L4158"><span class="lineNum">    4158</span>              :   // DR 1261. Insufficent overloads for to_string / to_wstring</span>
<span id="L4159"><span class="lineNum">    4159</span>              : </span>
<span id="L4160"><span class="lineNum">    4160</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4161"><span class="lineNum">    4161</span>              :   inline string</span>
<span id="L4162"><span class="lineNum">    4162</span>              :   to_string(int __val)</span>
<span id="L4163"><span class="lineNum">    4163</span>              : #if _GLIBCXX_USE_CXX11_ABI &amp;&amp; (__CHAR_BIT__ * __SIZEOF_INT__) &lt;= 32</span>
<span id="L4164"><span class="lineNum">    4164</span>              :   noexcept // any 32-bit value fits in the SSO buffer</span>
<span id="L4165"><span class="lineNum">    4165</span>              : #endif</span>
<span id="L4166"><span class="lineNum">    4166</span>              :   {</span>
<span id="L4167"><span class="lineNum">    4167</span>              :     const bool __neg = __val &lt; 0;</span>
<span id="L4168"><span class="lineNum">    4168</span>              :     const unsigned __uval = __neg ? (unsigned)~__val + 1u : __val;</span>
<span id="L4169"><span class="lineNum">    4169</span>              :     const auto __len = __detail::__to_chars_len(__uval);</span>
<span id="L4170"><span class="lineNum">    4170</span>              :     string __str(__neg + __len, '-');</span>
<span id="L4171"><span class="lineNum">    4171</span>              :     __detail::__to_chars_10_impl(&amp;__str[__neg], __len, __uval);</span>
<span id="L4172"><span class="lineNum">    4172</span>              :     return __str;</span>
<span id="L4173"><span class="lineNum">    4173</span>              :   }</span>
<span id="L4174"><span class="lineNum">    4174</span>              : </span>
<span id="L4175"><span class="lineNum">    4175</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4176"><span class="lineNum">    4176</span>              :   inline string</span>
<span id="L4177"><span class="lineNum">    4177</span>              :   to_string(unsigned __val)</span>
<span id="L4178"><span class="lineNum">    4178</span>              : #if _GLIBCXX_USE_CXX11_ABI &amp;&amp; (__CHAR_BIT__ * __SIZEOF_INT__) &lt;= 32</span>
<span id="L4179"><span class="lineNum">    4179</span>              :   noexcept // any 32-bit value fits in the SSO buffer</span>
<span id="L4180"><span class="lineNum">    4180</span>              : #endif</span>
<span id="L4181"><span class="lineNum">    4181</span>              :   {</span>
<span id="L4182"><span class="lineNum">    4182</span>              :     string __str(__detail::__to_chars_len(__val), '\0');</span>
<span id="L4183"><span class="lineNum">    4183</span>              :     __detail::__to_chars_10_impl(&amp;__str[0], __str.size(), __val);</span>
<span id="L4184"><span class="lineNum">    4184</span>              :     return __str;</span>
<span id="L4185"><span class="lineNum">    4185</span>              :   }</span>
<span id="L4186"><span class="lineNum">    4186</span>              : </span>
<span id="L4187"><span class="lineNum">    4187</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4188"><span class="lineNum">    4188</span>              :   inline string</span>
<span id="L4189"><span class="lineNum">    4189</span>              :   to_string(long __val)</span>
<span id="L4190"><span class="lineNum">    4190</span>              : #if _GLIBCXX_USE_CXX11_ABI &amp;&amp; (__CHAR_BIT__ * __SIZEOF_LONG__) &lt;= 32</span>
<span id="L4191"><span class="lineNum">    4191</span>              :   noexcept // any 32-bit value fits in the SSO buffer</span>
<span id="L4192"><span class="lineNum">    4192</span>              : #endif</span>
<span id="L4193"><span class="lineNum">    4193</span>              :   {</span>
<span id="L4194"><span class="lineNum">    4194</span>              :     const bool __neg = __val &lt; 0;</span>
<span id="L4195"><span class="lineNum">    4195</span>              :     const unsigned long __uval = __neg ? (unsigned long)~__val + 1ul : __val;</span>
<span id="L4196"><span class="lineNum">    4196</span>              :     const auto __len = __detail::__to_chars_len(__uval);</span>
<span id="L4197"><span class="lineNum">    4197</span>              :     string __str(__neg + __len, '-');</span>
<span id="L4198"><span class="lineNum">    4198</span>              :     __detail::__to_chars_10_impl(&amp;__str[__neg], __len, __uval);</span>
<span id="L4199"><span class="lineNum">    4199</span>              :     return __str;</span>
<span id="L4200"><span class="lineNum">    4200</span>              :   }</span>
<span id="L4201"><span class="lineNum">    4201</span>              : </span>
<span id="L4202"><span class="lineNum">    4202</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4203"><span class="lineNum">    4203</span>              :   inline string</span>
<span id="L4204"><span class="lineNum">    4204</span>              :   to_string(unsigned long __val)</span>
<span id="L4205"><span class="lineNum">    4205</span>              : #if _GLIBCXX_USE_CXX11_ABI &amp;&amp; (__CHAR_BIT__ * __SIZEOF_LONG__) &lt;= 32</span>
<span id="L4206"><span class="lineNum">    4206</span>              :   noexcept // any 32-bit value fits in the SSO buffer</span>
<span id="L4207"><span class="lineNum">    4207</span>              : #endif</span>
<span id="L4208"><span class="lineNum">    4208</span>              :   {</span>
<span id="L4209"><span class="lineNum">    4209</span>              :     string __str(__detail::__to_chars_len(__val), '\0');</span>
<span id="L4210"><span class="lineNum">    4210</span>              :     __detail::__to_chars_10_impl(&amp;__str[0], __str.size(), __val);</span>
<span id="L4211"><span class="lineNum">    4211</span>              :     return __str;</span>
<span id="L4212"><span class="lineNum">    4212</span>              :   }</span>
<span id="L4213"><span class="lineNum">    4213</span>              : </span>
<span id="L4214"><span class="lineNum">    4214</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4215"><span class="lineNum">    4215</span>              :   inline string</span>
<span id="L4216"><span class="lineNum">    4216</span>              :   to_string(long long __val)</span>
<span id="L4217"><span class="lineNum">    4217</span>              :   {</span>
<span id="L4218"><span class="lineNum">    4218</span>              :     const bool __neg = __val &lt; 0;</span>
<span id="L4219"><span class="lineNum">    4219</span>              :     const unsigned long long __uval</span>
<span id="L4220"><span class="lineNum">    4220</span>              :       = __neg ? (unsigned long long)~__val + 1ull : __val;</span>
<span id="L4221"><span class="lineNum">    4221</span>              :     const auto __len = __detail::__to_chars_len(__uval);</span>
<span id="L4222"><span class="lineNum">    4222</span>              :     string __str(__neg + __len, '-');</span>
<span id="L4223"><span class="lineNum">    4223</span>              :     __detail::__to_chars_10_impl(&amp;__str[__neg], __len, __uval);</span>
<span id="L4224"><span class="lineNum">    4224</span>              :     return __str;</span>
<span id="L4225"><span class="lineNum">    4225</span>              :   }</span>
<span id="L4226"><span class="lineNum">    4226</span>              : </span>
<span id="L4227"><span class="lineNum">    4227</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4228"><span class="lineNum">    4228</span>              :   inline string</span>
<span id="L4229"><span class="lineNum">    4229</span>              :   to_string(unsigned long long __val)</span>
<span id="L4230"><span class="lineNum">    4230</span>              :   {</span>
<span id="L4231"><span class="lineNum">    4231</span>              :     string __str(__detail::__to_chars_len(__val), '\0');</span>
<span id="L4232"><span class="lineNum">    4232</span>              :     __detail::__to_chars_10_impl(&amp;__str[0], __str.size(), __val);</span>
<span id="L4233"><span class="lineNum">    4233</span>              :     return __str;</span>
<span id="L4234"><span class="lineNum">    4234</span>              :   }</span>
<span id="L4235"><span class="lineNum">    4235</span>              : </span>
<span id="L4236"><span class="lineNum">    4236</span>              : #if _GLIBCXX_USE_C99_STDIO</span>
<span id="L4237"><span class="lineNum">    4237</span>              :   // NB: (v)snprintf vs sprintf.</span>
<span id="L4238"><span class="lineNum">    4238</span>              : </span>
<span id="L4239"><span class="lineNum">    4239</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4240"><span class="lineNum">    4240</span>              :   inline string</span>
<span id="L4241"><span class="lineNum">    4241</span>              :   to_string(float __val)</span>
<span id="L4242"><span class="lineNum">    4242</span>              :   {</span>
<span id="L4243"><span class="lineNum">    4243</span>              :     const int __n = </span>
<span id="L4244"><span class="lineNum">    4244</span>              :       __gnu_cxx::__numeric_traits&lt;float&gt;::__max_exponent10 + 20;</span>
<span id="L4245"><span class="lineNum">    4245</span>              :     return __gnu_cxx::__to_xstring&lt;string&gt;(&amp;std::vsnprintf, __n,</span>
<span id="L4246"><span class="lineNum">    4246</span>              :                                            &quot;%f&quot;, __val);</span>
<span id="L4247"><span class="lineNum">    4247</span>              :   }</span>
<span id="L4248"><span class="lineNum">    4248</span>              : </span>
<span id="L4249"><span class="lineNum">    4249</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4250"><span class="lineNum">    4250</span>              :   inline string</span>
<span id="L4251"><span class="lineNum">    4251</span>              :   to_string(double __val)</span>
<span id="L4252"><span class="lineNum">    4252</span>              :   {</span>
<span id="L4253"><span class="lineNum">    4253</span>              :     const int __n = </span>
<span id="L4254"><span class="lineNum">    4254</span>              :       __gnu_cxx::__numeric_traits&lt;double&gt;::__max_exponent10 + 20;</span>
<span id="L4255"><span class="lineNum">    4255</span>              :     return __gnu_cxx::__to_xstring&lt;string&gt;(&amp;std::vsnprintf, __n,</span>
<span id="L4256"><span class="lineNum">    4256</span>              :                                            &quot;%f&quot;, __val);</span>
<span id="L4257"><span class="lineNum">    4257</span>              :   }</span>
<span id="L4258"><span class="lineNum">    4258</span>              : </span>
<span id="L4259"><span class="lineNum">    4259</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4260"><span class="lineNum">    4260</span>              :   inline string</span>
<span id="L4261"><span class="lineNum">    4261</span>              :   to_string(long double __val)</span>
<span id="L4262"><span class="lineNum">    4262</span>              :   {</span>
<span id="L4263"><span class="lineNum">    4263</span>              :     const int __n = </span>
<span id="L4264"><span class="lineNum">    4264</span>              :       __gnu_cxx::__numeric_traits&lt;long double&gt;::__max_exponent10 + 20;</span>
<span id="L4265"><span class="lineNum">    4265</span>              :     return __gnu_cxx::__to_xstring&lt;string&gt;(&amp;std::vsnprintf, __n,</span>
<span id="L4266"><span class="lineNum">    4266</span>              :                                            &quot;%Lf&quot;, __val);</span>
<span id="L4267"><span class="lineNum">    4267</span>              :   }</span>
<span id="L4268"><span class="lineNum">    4268</span>              : #endif // _GLIBCXX_USE_C99_STDIO</span>
<span id="L4269"><span class="lineNum">    4269</span>              : </span>
<span id="L4270"><span class="lineNum">    4270</span>              : #if defined(_GLIBCXX_USE_WCHAR_T) &amp;&amp; _GLIBCXX_USE_C99_WCHAR</span>
<span id="L4271"><span class="lineNum">    4271</span>              :   inline int </span>
<span id="L4272"><span class="lineNum">    4272</span>              :   stoi(const wstring&amp; __str, size_t* __idx = 0, int __base = 10)</span>
<span id="L4273"><span class="lineNum">    4273</span>              :   { return __gnu_cxx::__stoa&lt;long, int&gt;(&amp;std::wcstol, &quot;stoi&quot;, __str.c_str(),</span>
<span id="L4274"><span class="lineNum">    4274</span>              :                                         __idx, __base); }</span>
<span id="L4275"><span class="lineNum">    4275</span>              : </span>
<span id="L4276"><span class="lineNum">    4276</span>              :   inline long </span>
<span id="L4277"><span class="lineNum">    4277</span>              :   stol(const wstring&amp; __str, size_t* __idx = 0, int __base = 10)</span>
<span id="L4278"><span class="lineNum">    4278</span>              :   { return __gnu_cxx::__stoa(&amp;std::wcstol, &quot;stol&quot;, __str.c_str(),</span>
<span id="L4279"><span class="lineNum">    4279</span>              :                              __idx, __base); }</span>
<span id="L4280"><span class="lineNum">    4280</span>              : </span>
<span id="L4281"><span class="lineNum">    4281</span>              :   inline unsigned long</span>
<span id="L4282"><span class="lineNum">    4282</span>              :   stoul(const wstring&amp; __str, size_t* __idx = 0, int __base = 10)</span>
<span id="L4283"><span class="lineNum">    4283</span>              :   { return __gnu_cxx::__stoa(&amp;std::wcstoul, &quot;stoul&quot;, __str.c_str(),</span>
<span id="L4284"><span class="lineNum">    4284</span>              :                              __idx, __base); }</span>
<span id="L4285"><span class="lineNum">    4285</span>              : </span>
<span id="L4286"><span class="lineNum">    4286</span>              :   inline long long</span>
<span id="L4287"><span class="lineNum">    4287</span>              :   stoll(const wstring&amp; __str, size_t* __idx = 0, int __base = 10)</span>
<span id="L4288"><span class="lineNum">    4288</span>              :   { return __gnu_cxx::__stoa(&amp;std::wcstoll, &quot;stoll&quot;, __str.c_str(),</span>
<span id="L4289"><span class="lineNum">    4289</span>              :                              __idx, __base); }</span>
<span id="L4290"><span class="lineNum">    4290</span>              : </span>
<span id="L4291"><span class="lineNum">    4291</span>              :   inline unsigned long long</span>
<span id="L4292"><span class="lineNum">    4292</span>              :   stoull(const wstring&amp; __str, size_t* __idx = 0, int __base = 10)</span>
<span id="L4293"><span class="lineNum">    4293</span>              :   { return __gnu_cxx::__stoa(&amp;std::wcstoull, &quot;stoull&quot;, __str.c_str(),</span>
<span id="L4294"><span class="lineNum">    4294</span>              :                              __idx, __base); }</span>
<span id="L4295"><span class="lineNum">    4295</span>              : </span>
<span id="L4296"><span class="lineNum">    4296</span>              :   // NB: wcstof vs wcstod.</span>
<span id="L4297"><span class="lineNum">    4297</span>              :   inline float</span>
<span id="L4298"><span class="lineNum">    4298</span>              :   stof(const wstring&amp; __str, size_t* __idx = 0)</span>
<span id="L4299"><span class="lineNum">    4299</span>              :   { return __gnu_cxx::__stoa(&amp;std::wcstof, &quot;stof&quot;, __str.c_str(), __idx); }</span>
<span id="L4300"><span class="lineNum">    4300</span>              : </span>
<span id="L4301"><span class="lineNum">    4301</span>              :   inline double</span>
<span id="L4302"><span class="lineNum">    4302</span>              :   stod(const wstring&amp; __str, size_t* __idx = 0)</span>
<span id="L4303"><span class="lineNum">    4303</span>              :   { return __gnu_cxx::__stoa(&amp;std::wcstod, &quot;stod&quot;, __str.c_str(), __idx); }</span>
<span id="L4304"><span class="lineNum">    4304</span>              : </span>
<span id="L4305"><span class="lineNum">    4305</span>              :   inline long double</span>
<span id="L4306"><span class="lineNum">    4306</span>              :   stold(const wstring&amp; __str, size_t* __idx = 0)</span>
<span id="L4307"><span class="lineNum">    4307</span>              :   { return __gnu_cxx::__stoa(&amp;std::wcstold, &quot;stold&quot;, __str.c_str(), __idx); }</span>
<span id="L4308"><span class="lineNum">    4308</span>              : </span>
<span id="L4309"><span class="lineNum">    4309</span>              : #ifndef _GLIBCXX_HAVE_BROKEN_VSWPRINTF</span>
<span id="L4310"><span class="lineNum">    4310</span>              :   // DR 1261.</span>
<span id="L4311"><span class="lineNum">    4311</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4312"><span class="lineNum">    4312</span>              :   inline wstring</span>
<span id="L4313"><span class="lineNum">    4313</span>              :   to_wstring(int __val)</span>
<span id="L4314"><span class="lineNum">    4314</span>              :   { return __gnu_cxx::__to_xstring&lt;wstring&gt;(&amp;std::vswprintf, 4 * sizeof(int),</span>
<span id="L4315"><span class="lineNum">    4315</span>              :                                             L&quot;%d&quot;, __val); }</span>
<span id="L4316"><span class="lineNum">    4316</span>              : </span>
<span id="L4317"><span class="lineNum">    4317</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4318"><span class="lineNum">    4318</span>              :   inline wstring</span>
<span id="L4319"><span class="lineNum">    4319</span>              :   to_wstring(unsigned __val)</span>
<span id="L4320"><span class="lineNum">    4320</span>              :   { return __gnu_cxx::__to_xstring&lt;wstring&gt;(&amp;std::vswprintf,</span>
<span id="L4321"><span class="lineNum">    4321</span>              :                                             4 * sizeof(unsigned),</span>
<span id="L4322"><span class="lineNum">    4322</span>              :                                             L&quot;%u&quot;, __val); }</span>
<span id="L4323"><span class="lineNum">    4323</span>              : </span>
<span id="L4324"><span class="lineNum">    4324</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4325"><span class="lineNum">    4325</span>              :   inline wstring</span>
<span id="L4326"><span class="lineNum">    4326</span>              :   to_wstring(long __val)</span>
<span id="L4327"><span class="lineNum">    4327</span>              :   { return __gnu_cxx::__to_xstring&lt;wstring&gt;(&amp;std::vswprintf, 4 * sizeof(long),</span>
<span id="L4328"><span class="lineNum">    4328</span>              :                                             L&quot;%ld&quot;, __val); }</span>
<span id="L4329"><span class="lineNum">    4329</span>              : </span>
<span id="L4330"><span class="lineNum">    4330</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4331"><span class="lineNum">    4331</span>              :   inline wstring</span>
<span id="L4332"><span class="lineNum">    4332</span>              :   to_wstring(unsigned long __val)</span>
<span id="L4333"><span class="lineNum">    4333</span>              :   { return __gnu_cxx::__to_xstring&lt;wstring&gt;(&amp;std::vswprintf,</span>
<span id="L4334"><span class="lineNum">    4334</span>              :                                             4 * sizeof(unsigned long),</span>
<span id="L4335"><span class="lineNum">    4335</span>              :                                             L&quot;%lu&quot;, __val); }</span>
<span id="L4336"><span class="lineNum">    4336</span>              : </span>
<span id="L4337"><span class="lineNum">    4337</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4338"><span class="lineNum">    4338</span>              :   inline wstring</span>
<span id="L4339"><span class="lineNum">    4339</span>              :   to_wstring(long long __val)</span>
<span id="L4340"><span class="lineNum">    4340</span>              :   { return __gnu_cxx::__to_xstring&lt;wstring&gt;(&amp;std::vswprintf,</span>
<span id="L4341"><span class="lineNum">    4341</span>              :                                             4 * sizeof(long long),</span>
<span id="L4342"><span class="lineNum">    4342</span>              :                                             L&quot;%lld&quot;, __val); }</span>
<span id="L4343"><span class="lineNum">    4343</span>              : </span>
<span id="L4344"><span class="lineNum">    4344</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4345"><span class="lineNum">    4345</span>              :   inline wstring</span>
<span id="L4346"><span class="lineNum">    4346</span>              :   to_wstring(unsigned long long __val)</span>
<span id="L4347"><span class="lineNum">    4347</span>              :   { return __gnu_cxx::__to_xstring&lt;wstring&gt;(&amp;std::vswprintf,</span>
<span id="L4348"><span class="lineNum">    4348</span>              :                                             4 * sizeof(unsigned long long),</span>
<span id="L4349"><span class="lineNum">    4349</span>              :                                             L&quot;%llu&quot;, __val); }</span>
<span id="L4350"><span class="lineNum">    4350</span>              : </span>
<span id="L4351"><span class="lineNum">    4351</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4352"><span class="lineNum">    4352</span>              :   inline wstring</span>
<span id="L4353"><span class="lineNum">    4353</span>              :   to_wstring(float __val)</span>
<span id="L4354"><span class="lineNum">    4354</span>              :   {</span>
<span id="L4355"><span class="lineNum">    4355</span>              :     const int __n =</span>
<span id="L4356"><span class="lineNum">    4356</span>              :       __gnu_cxx::__numeric_traits&lt;float&gt;::__max_exponent10 + 20;</span>
<span id="L4357"><span class="lineNum">    4357</span>              :     return __gnu_cxx::__to_xstring&lt;wstring&gt;(&amp;std::vswprintf, __n,</span>
<span id="L4358"><span class="lineNum">    4358</span>              :                                             L&quot;%f&quot;, __val);</span>
<span id="L4359"><span class="lineNum">    4359</span>              :   }</span>
<span id="L4360"><span class="lineNum">    4360</span>              : </span>
<span id="L4361"><span class="lineNum">    4361</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4362"><span class="lineNum">    4362</span>              :   inline wstring</span>
<span id="L4363"><span class="lineNum">    4363</span>              :   to_wstring(double __val)</span>
<span id="L4364"><span class="lineNum">    4364</span>              :   {</span>
<span id="L4365"><span class="lineNum">    4365</span>              :     const int __n =</span>
<span id="L4366"><span class="lineNum">    4366</span>              :       __gnu_cxx::__numeric_traits&lt;double&gt;::__max_exponent10 + 20;</span>
<span id="L4367"><span class="lineNum">    4367</span>              :     return __gnu_cxx::__to_xstring&lt;wstring&gt;(&amp;std::vswprintf, __n,</span>
<span id="L4368"><span class="lineNum">    4368</span>              :                                             L&quot;%f&quot;, __val);</span>
<span id="L4369"><span class="lineNum">    4369</span>              :   }</span>
<span id="L4370"><span class="lineNum">    4370</span>              : </span>
<span id="L4371"><span class="lineNum">    4371</span>              :   _GLIBCXX_NODISCARD</span>
<span id="L4372"><span class="lineNum">    4372</span>              :   inline wstring</span>
<span id="L4373"><span class="lineNum">    4373</span>              :   to_wstring(long double __val)</span>
<span id="L4374"><span class="lineNum">    4374</span>              :   {</span>
<span id="L4375"><span class="lineNum">    4375</span>              :     const int __n =</span>
<span id="L4376"><span class="lineNum">    4376</span>              :       __gnu_cxx::__numeric_traits&lt;long double&gt;::__max_exponent10 + 20;</span>
<span id="L4377"><span class="lineNum">    4377</span>              :     return __gnu_cxx::__to_xstring&lt;wstring&gt;(&amp;std::vswprintf, __n,</span>
<span id="L4378"><span class="lineNum">    4378</span>              :                                             L&quot;%Lf&quot;, __val);</span>
<span id="L4379"><span class="lineNum">    4379</span>              :   }</span>
<span id="L4380"><span class="lineNum">    4380</span>              : #endif // _GLIBCXX_HAVE_BROKEN_VSWPRINTF</span>
<span id="L4381"><span class="lineNum">    4381</span>              : #endif // _GLIBCXX_USE_WCHAR_T &amp;&amp; _GLIBCXX_USE_C99_WCHAR</span>
<span id="L4382"><span class="lineNum">    4382</span>              : </span>
<span id="L4383"><span class="lineNum">    4383</span>              : _GLIBCXX_END_NAMESPACE_CXX11</span>
<span id="L4384"><span class="lineNum">    4384</span>              : _GLIBCXX_END_NAMESPACE_VERSION</span>
<span id="L4385"><span class="lineNum">    4385</span>              : } // namespace</span>
<span id="L4386"><span class="lineNum">    4386</span>              : </span>
<span id="L4387"><span class="lineNum">    4387</span>              : #endif /* C++11 */</span>
<span id="L4388"><span class="lineNum">    4388</span>              : </span>
<span id="L4389"><span class="lineNum">    4389</span>              : #if __cplusplus &gt;= 201103L</span>
<span id="L4390"><span class="lineNum">    4390</span>              : </span>
<span id="L4391"><span class="lineNum">    4391</span>              : #include &lt;bits/functional_hash.h&gt;</span>
<span id="L4392"><span class="lineNum">    4392</span>              : </span>
<span id="L4393"><span class="lineNum">    4393</span>              : namespace std _GLIBCXX_VISIBILITY(default)</span>
<span id="L4394"><span class="lineNum">    4394</span>              : {</span>
<span id="L4395"><span class="lineNum">    4395</span>              : _GLIBCXX_BEGIN_NAMESPACE_VERSION</span>
<span id="L4396"><span class="lineNum">    4396</span>              : </span>
<span id="L4397"><span class="lineNum">    4397</span>              :   // _GLIBCXX_RESOLVE_LIB_DEFECTS</span>
<span id="L4398"><span class="lineNum">    4398</span>              :   // 3705. Hashability shouldn't depend on basic_string's allocator</span>
<span id="L4399"><span class="lineNum">    4399</span>              : </span>
<span id="L4400"><span class="lineNum">    4400</span>              :   template&lt;typename _CharT, typename _Alloc,</span>
<span id="L4401"><span class="lineNum">    4401</span>              :            typename _StrT = basic_string&lt;_CharT, char_traits&lt;_CharT&gt;, _Alloc&gt;&gt;</span>
<span id="L4402"><span class="lineNum">    4402</span>              :     struct __str_hash_base</span>
<span id="L4403"><span class="lineNum">    4403</span>              :     : public __hash_base&lt;size_t, _StrT&gt;</span>
<span id="L4404"><span class="lineNum">    4404</span>              :     {</span>
<span id="L4405"><span class="lineNum">    4405</span>              :       [[__nodiscard__]]</span>
<span id="L4406"><span class="lineNum">    4406</span>              :       size_t</span>
<span id="L4407"><span class="lineNum">    4407</span> <span class="tlaGNC tlaBgGNC">           2 :       operator()(const _StrT&amp; __s) const noexcept</span></span>
<span id="L4408"><span class="lineNum">    4408</span> <span class="tlaGNC">           2 :       { return _Hash_impl::hash(__s.data(), __s.length() * sizeof(_CharT)); }</span></span>
<span id="L4409"><span class="lineNum">    4409</span>              :     };</span>
<span id="L4410"><span class="lineNum">    4410</span>              : </span>
<span id="L4411"><span class="lineNum">    4411</span>              : #ifndef _GLIBCXX_COMPATIBILITY_CXX0X</span>
<span id="L4412"><span class="lineNum">    4412</span>              :   /// std::hash specialization for string.</span>
<span id="L4413"><span class="lineNum">    4413</span>              :   template&lt;typename _Alloc&gt;</span>
<span id="L4414"><span class="lineNum">    4414</span>              :     struct hash&lt;basic_string&lt;char, char_traits&lt;char&gt;, _Alloc&gt;&gt;</span>
<span id="L4415"><span class="lineNum">    4415</span>              :     : public __str_hash_base&lt;char, _Alloc&gt;</span>
<span id="L4416"><span class="lineNum">    4416</span>              :     { };</span>
<span id="L4417"><span class="lineNum">    4417</span>              : </span>
<span id="L4418"><span class="lineNum">    4418</span>              :   /// std::hash specialization for wstring.</span>
<span id="L4419"><span class="lineNum">    4419</span>              :   template&lt;typename _Alloc&gt;</span>
<span id="L4420"><span class="lineNum">    4420</span>              :     struct hash&lt;basic_string&lt;wchar_t, char_traits&lt;wchar_t&gt;, _Alloc&gt;&gt;</span>
<span id="L4421"><span class="lineNum">    4421</span>              :     : public __str_hash_base&lt;wchar_t, _Alloc&gt;</span>
<span id="L4422"><span class="lineNum">    4422</span>              :     { };</span>
<span id="L4423"><span class="lineNum">    4423</span>              : </span>
<span id="L4424"><span class="lineNum">    4424</span>              :   template&lt;typename _Alloc&gt;</span>
<span id="L4425"><span class="lineNum">    4425</span>              :     struct __is_fast_hash&lt;hash&lt;basic_string&lt;wchar_t, char_traits&lt;wchar_t&gt;,</span>
<span id="L4426"><span class="lineNum">    4426</span>              :                                             _Alloc&gt;&gt;&gt;</span>
<span id="L4427"><span class="lineNum">    4427</span>              :     : std::false_type</span>
<span id="L4428"><span class="lineNum">    4428</span>              :     { };</span>
<span id="L4429"><span class="lineNum">    4429</span>              : #endif /* _GLIBCXX_COMPATIBILITY_CXX0X */</span>
<span id="L4430"><span class="lineNum">    4430</span>              : </span>
<span id="L4431"><span class="lineNum">    4431</span>              : #ifdef _GLIBCXX_USE_CHAR8_T</span>
<span id="L4432"><span class="lineNum">    4432</span>              :   /// std::hash specialization for u8string.</span>
<span id="L4433"><span class="lineNum">    4433</span>              :   template&lt;typename _Alloc&gt;</span>
<span id="L4434"><span class="lineNum">    4434</span>              :     struct hash&lt;basic_string&lt;char8_t, char_traits&lt;char8_t&gt;, _Alloc&gt;&gt;</span>
<span id="L4435"><span class="lineNum">    4435</span>              :     : public __str_hash_base&lt;char8_t, _Alloc&gt;</span>
<span id="L4436"><span class="lineNum">    4436</span>              :     { };</span>
<span id="L4437"><span class="lineNum">    4437</span>              : #endif</span>
<span id="L4438"><span class="lineNum">    4438</span>              : </span>
<span id="L4439"><span class="lineNum">    4439</span>              :   /// std::hash specialization for u16string.</span>
<span id="L4440"><span class="lineNum">    4440</span>              :   template&lt;typename _Alloc&gt;</span>
<span id="L4441"><span class="lineNum">    4441</span>              :     struct hash&lt;basic_string&lt;char16_t, char_traits&lt;char16_t&gt;, _Alloc&gt;&gt;</span>
<span id="L4442"><span class="lineNum">    4442</span>              :     : public __str_hash_base&lt;char16_t, _Alloc&gt;</span>
<span id="L4443"><span class="lineNum">    4443</span>              :     { };</span>
<span id="L4444"><span class="lineNum">    4444</span>              : </span>
<span id="L4445"><span class="lineNum">    4445</span>              :   /// std::hash specialization for u32string.</span>
<span id="L4446"><span class="lineNum">    4446</span>              :   template&lt;typename _Alloc&gt;</span>
<span id="L4447"><span class="lineNum">    4447</span>              :     struct hash&lt;basic_string&lt;char32_t, char_traits&lt;char32_t&gt;, _Alloc&gt;&gt;</span>
<span id="L4448"><span class="lineNum">    4448</span>              :     : public __str_hash_base&lt;char32_t, _Alloc&gt;</span>
<span id="L4449"><span class="lineNum">    4449</span>              :     { };</span>
<span id="L4450"><span class="lineNum">    4450</span>              : </span>
<span id="L4451"><span class="lineNum">    4451</span>              : #if ! _GLIBCXX_INLINE_VERSION</span>
<span id="L4452"><span class="lineNum">    4452</span>              :   // PR libstdc++/105907 - __is_fast_hash affects unordered container ABI.</span>
<span id="L4453"><span class="lineNum">    4453</span>              :   template&lt;&gt; struct __is_fast_hash&lt;hash&lt;string&gt;&gt; : std::false_type { };</span>
<span id="L4454"><span class="lineNum">    4454</span>              :   template&lt;&gt; struct __is_fast_hash&lt;hash&lt;wstring&gt;&gt; : std::false_type { };</span>
<span id="L4455"><span class="lineNum">    4455</span>              :   template&lt;&gt; struct __is_fast_hash&lt;hash&lt;u16string&gt;&gt; : std::false_type { };</span>
<span id="L4456"><span class="lineNum">    4456</span>              :   template&lt;&gt; struct __is_fast_hash&lt;hash&lt;u32string&gt;&gt; : std::false_type { };</span>
<span id="L4457"><span class="lineNum">    4457</span>              : #ifdef _GLIBCXX_USE_CHAR8_T</span>
<span id="L4458"><span class="lineNum">    4458</span>              :   template&lt;&gt; struct __is_fast_hash&lt;hash&lt;u8string&gt;&gt; : std::false_type { };</span>
<span id="L4459"><span class="lineNum">    4459</span>              : #endif</span>
<span id="L4460"><span class="lineNum">    4460</span>              : #else</span>
<span id="L4461"><span class="lineNum">    4461</span>              :   // For versioned namespace, assume every std::hash&lt;basic_string&lt;&gt;&gt; is slow.</span>
<span id="L4462"><span class="lineNum">    4462</span>              :   template&lt;typename _CharT, typename _Traits, typename _Alloc&gt;</span>
<span id="L4463"><span class="lineNum">    4463</span>              :     struct __is_fast_hash&lt;hash&lt;basic_string&lt;_CharT, _Traits, _Alloc&gt;&gt;&gt;</span>
<span id="L4464"><span class="lineNum">    4464</span>              :     : std::false_type</span>
<span id="L4465"><span class="lineNum">    4465</span>              :     { };</span>
<span id="L4466"><span class="lineNum">    4466</span>              : #endif</span>
<span id="L4467"><span class="lineNum">    4467</span>              : </span>
<span id="L4468"><span class="lineNum">    4468</span>              : #if __cplusplus &gt;= 201402L</span>
<span id="L4469"><span class="lineNum">    4469</span>              : </span>
<span id="L4470"><span class="lineNum">    4470</span>              : #define __cpp_lib_string_udls 201304L</span>
<span id="L4471"><span class="lineNum">    4471</span>              : </span>
<span id="L4472"><span class="lineNum">    4472</span>              :   inline namespace literals</span>
<span id="L4473"><span class="lineNum">    4473</span>              :   {</span>
<span id="L4474"><span class="lineNum">    4474</span>              :   inline namespace string_literals</span>
<span id="L4475"><span class="lineNum">    4475</span>              :   {</span>
<span id="L4476"><span class="lineNum">    4476</span>              : #pragma GCC diagnostic push</span>
<span id="L4477"><span class="lineNum">    4477</span>              : #pragma GCC diagnostic ignored &quot;-Wliteral-suffix&quot;</span>
<span id="L4478"><span class="lineNum">    4478</span>              : </span>
<span id="L4479"><span class="lineNum">    4479</span>              : #if __cpp_lib_constexpr_string &gt;= 201907L</span>
<span id="L4480"><span class="lineNum">    4480</span>              : # define _GLIBCXX_STRING_CONSTEXPR constexpr</span>
<span id="L4481"><span class="lineNum">    4481</span>              : #else</span>
<span id="L4482"><span class="lineNum">    4482</span>              : # define _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L4483"><span class="lineNum">    4483</span>              : #endif</span>
<span id="L4484"><span class="lineNum">    4484</span>              : </span>
<span id="L4485"><span class="lineNum">    4485</span>              :     _GLIBCXX_DEFAULT_ABI_TAG _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L4486"><span class="lineNum">    4486</span>              :     inline basic_string&lt;char&gt;</span>
<span id="L4487"><span class="lineNum">    4487</span>              :     operator&quot;&quot;s(const char* __str, size_t __len)</span>
<span id="L4488"><span class="lineNum">    4488</span>              :     { return basic_string&lt;char&gt;{__str, __len}; }</span>
<span id="L4489"><span class="lineNum">    4489</span>              : </span>
<span id="L4490"><span class="lineNum">    4490</span>              :     _GLIBCXX_DEFAULT_ABI_TAG _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L4491"><span class="lineNum">    4491</span>              :     inline basic_string&lt;wchar_t&gt;</span>
<span id="L4492"><span class="lineNum">    4492</span>              :     operator&quot;&quot;s(const wchar_t* __str, size_t __len)</span>
<span id="L4493"><span class="lineNum">    4493</span>              :     { return basic_string&lt;wchar_t&gt;{__str, __len}; }</span>
<span id="L4494"><span class="lineNum">    4494</span>              : </span>
<span id="L4495"><span class="lineNum">    4495</span>              : #ifdef _GLIBCXX_USE_CHAR8_T</span>
<span id="L4496"><span class="lineNum">    4496</span>              :     _GLIBCXX_DEFAULT_ABI_TAG _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L4497"><span class="lineNum">    4497</span>              :     inline basic_string&lt;char8_t&gt;</span>
<span id="L4498"><span class="lineNum">    4498</span>              :     operator&quot;&quot;s(const char8_t* __str, size_t __len)</span>
<span id="L4499"><span class="lineNum">    4499</span>              :     { return basic_string&lt;char8_t&gt;{__str, __len}; }</span>
<span id="L4500"><span class="lineNum">    4500</span>              : #endif</span>
<span id="L4501"><span class="lineNum">    4501</span>              : </span>
<span id="L4502"><span class="lineNum">    4502</span>              :     _GLIBCXX_DEFAULT_ABI_TAG _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L4503"><span class="lineNum">    4503</span>              :     inline basic_string&lt;char16_t&gt;</span>
<span id="L4504"><span class="lineNum">    4504</span>              :     operator&quot;&quot;s(const char16_t* __str, size_t __len)</span>
<span id="L4505"><span class="lineNum">    4505</span>              :     { return basic_string&lt;char16_t&gt;{__str, __len}; }</span>
<span id="L4506"><span class="lineNum">    4506</span>              : </span>
<span id="L4507"><span class="lineNum">    4507</span>              :     _GLIBCXX_DEFAULT_ABI_TAG _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L4508"><span class="lineNum">    4508</span>              :     inline basic_string&lt;char32_t&gt;</span>
<span id="L4509"><span class="lineNum">    4509</span>              :     operator&quot;&quot;s(const char32_t* __str, size_t __len)</span>
<span id="L4510"><span class="lineNum">    4510</span>              :     { return basic_string&lt;char32_t&gt;{__str, __len}; }</span>
<span id="L4511"><span class="lineNum">    4511</span>              : </span>
<span id="L4512"><span class="lineNum">    4512</span>              : #undef _GLIBCXX_STRING_CONSTEXPR</span>
<span id="L4513"><span class="lineNum">    4513</span>              : #pragma GCC diagnostic pop</span>
<span id="L4514"><span class="lineNum">    4514</span>              :   } // inline namespace string_literals</span>
<span id="L4515"><span class="lineNum">    4515</span>              :   } // inline namespace literals</span>
<span id="L4516"><span class="lineNum">    4516</span>              : </span>
<span id="L4517"><span class="lineNum">    4517</span>              : #if __cplusplus &gt;= 201703L</span>
<span id="L4518"><span class="lineNum">    4518</span>              :   namespace __detail::__variant</span>
<span id="L4519"><span class="lineNum">    4519</span>              :   {</span>
<span id="L4520"><span class="lineNum">    4520</span>              :     template&lt;typename&gt; struct _Never_valueless_alt; // see &lt;variant&gt;</span>
<span id="L4521"><span class="lineNum">    4521</span>              : </span>
<span id="L4522"><span class="lineNum">    4522</span>              :     // Provide the strong exception-safety guarantee when emplacing a</span>
<span id="L4523"><span class="lineNum">    4523</span>              :     // basic_string into a variant, but only if moving the string cannot throw.</span>
<span id="L4524"><span class="lineNum">    4524</span>              :     template&lt;typename _Tp, typename _Traits, typename _Alloc&gt;</span>
<span id="L4525"><span class="lineNum">    4525</span>              :       struct _Never_valueless_alt&lt;std::basic_string&lt;_Tp, _Traits, _Alloc&gt;&gt;</span>
<span id="L4526"><span class="lineNum">    4526</span>              :       : __and_&lt;</span>
<span id="L4527"><span class="lineNum">    4527</span>              :         is_nothrow_move_constructible&lt;std::basic_string&lt;_Tp, _Traits, _Alloc&gt;&gt;,</span>
<span id="L4528"><span class="lineNum">    4528</span>              :         is_nothrow_move_assignable&lt;std::basic_string&lt;_Tp, _Traits, _Alloc&gt;&gt;</span>
<span id="L4529"><span class="lineNum">    4529</span>              :         &gt;::type</span>
<span id="L4530"><span class="lineNum">    4530</span>              :       { };</span>
<span id="L4531"><span class="lineNum">    4531</span>              :   }  // namespace __detail::__variant</span>
<span id="L4532"><span class="lineNum">    4532</span>              : #endif // C++17</span>
<span id="L4533"><span class="lineNum">    4533</span>              : #endif // C++14</span>
<span id="L4534"><span class="lineNum">    4534</span>              : </span>
<span id="L4535"><span class="lineNum">    4535</span>              : _GLIBCXX_END_NAMESPACE_VERSION</span>
<span id="L4536"><span class="lineNum">    4536</span>              : } // namespace std</span>
<span id="L4537"><span class="lineNum">    4537</span>              : </span>
<span id="L4538"><span class="lineNum">    4538</span>              : #endif // C++11</span>
<span id="L4539"><span class="lineNum">    4539</span>              : </span>
<span id="L4540"><span class="lineNum">    4540</span>              : #endif /* _BASIC_STRING_H */</span>
        </pre>
              </td>
            </tr>
          </table>
          <br>

          <table width="100%" border=0 cellspacing=0 cellpadding=0>
            <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
            <tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
          </table>
          <br>

</body>
</html>
